public function getShares($url) { $data = json_decode(preg_replace('/^receiveCount\\((.*)\\)$/', '\\1', file_get_contents(sprintf(self::API_URL, urlencode($url))))); return intval($data->count); }