Xen0risDEV,
il y a 12 ans
Essaye donc:
function getGoogleCount($domain) {
$content = file_get_contents('http://ajax.googleapis.com/ajax/services/' .
'search/web?v=1.0&filter=0&q=site:' . urlencode($domain));
$data = json_decode($content);
$result = intval($data->responseData->cursor->estimatedResultCount);
if ($result > 1000) {
$result = floor($result / 1000) . 'K';
}
return $result;
}
echo getGoogleCount('http://www.grafikart.fr');