如何查看网址或网页链接的Google索引计数

时间:2010-12-30 11:20:34

标签: google-search

在我的项目中,我需要将此结果(Google索引计数)添加为 重要信息。

如果您有任何链接,我可以从中获取网址的Google索引数,这对我有帮助。

3 个答案:

答案 0 :(得分:0)

我知道回答这个问题的时间已经很晚了,但我有一个gr8 php函数来做到这一点......
因为我在寻找解决方案时偶然发现了你的问题 我想与未来的搜索者分享

php功能:

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;
}

用法(在所需位置):

<?php echo getGoogleCount('http://www.example.com'); ?>

希望这有帮助。
Sagive

答案 1 :(得分:0)

我不认为Google会将所有索引页面和索引链接信息共享给公众。它只与公众分享很少,但在Google网站管理员工具中向经过验证的网站管理员分享主要信息。

网站管理员工具结果可以随时随地显示。

您可以通过site:domain.com或site:url进行检查。谷歌使用的运营商很少 http://www.googleguide.com/advanced_operators_reference.html

答案 2 :(得分:-1)