不同的结果用php搜索索引页面


Different results google indexed pages with php

我有这个脚本来获取url的谷歌索引页面:

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);
return intval($data->responseData->cursor->estimatedResultCount);
}
echo getGoogleCount('http://stackoverflow.com/');

但它不允许我获取更多url的数据。然后我用了一些在线工具,结果和我的不一样。有没有其他方法可以不受限制地获取这些数据?谢谢

在循环中调用getGoogleCount怎么样?

$domains = array('domain 1', 'domain 2');
foreach ($domains as $domain) {
    echo getGoogleCount($domain);
}