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

发布于 2024-10-09 17:00:20 字数 92 浏览 0 评论 0原文

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

如果您有任何链接可以让我获取某个网址的 Google 索引计数,这对我会有帮助。

In my project I need this result (Google index count) to be added as an
important information.

If you have any link from where I can get Google index count of a url, it will be helpful to me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

天邊彩虹 2024-10-16 17:00:20

我知道回答这个问题已经晚了,但我有一个 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'); ?>

希望这会有所帮助。
萨吉夫

I know it late to answer this question but i got a gr8 php function to do that...
since i stumbled on your question while searching for a solution
i want to share it with future searchers

php Function:

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

Usage (in desired location):

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

Hope this helps.
Sagive

挽手叙旧 2024-10-16 17:00:20

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

网站管理员工具结果可以显示在您想要的任何地方。

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

I don't think that Google share all indexed pages and indexed links information to public. it only share few to public but share major information to verified web master in Google web-master tools.

Webmaster tools results can be displayed where ever you want.

You can check it via site:domain.com or site:url. there are few operators used by google
http://www.googleguide.com/advanced_operators_reference.html.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文