通过 API (PHP) 获取 Google PageRank

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1344917/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 02:07:46  来源:igfitidea点击:

Getting Google PageRank via an API (PHP)

phpapipagerank

提问by Henk Denneboom

I have a list of domains and would like to get the:

我有一个域列表,并希望获得:

  1. PageRank for all the domains. So just an integer, there must be an API that returns this.
  2. The number of results in Google
  3. The position of the word of the domainname. For example, "google.com" would be the position of the word "google". This could be position 20.
  1. 所有域的 PageRank。所以只是一个整数,必须有一个返回这个的API。
  2. Google 中的结果数量
  3. 域名单词的位置。例如,“google.com”将是“google”一词的位置。这可能是位置 20。

回答by denislexic

This will have everything you need. https://github.com/eyecatchup/SEOstats

这将拥有您需要的一切。 https://github.com/eyecatchup/SEOstats

Amazing.

惊人的。

回答by eyecatchUp

I've published a Pagerank APIthat returns a json array, containing the checksum and the Pagerank of any URL.

我发布了一个Pagerank API,它返回一个 json 数组,其中包含任何 URL 的校验和和 Pagerank。

I also have a bunch of related toolsand a Google code projectthat might interest you.

我还有一堆相关的工具和一个你可能感兴趣的谷歌代码项目

回答by marcc

  1. There isn't an API. However, there are ways to do it, all potentially problematic. If you were willing to use Python, I recently discovered a scriptto do it.

  2. Google used to have a SOAP API, but no longer. Some people scrape the results. You can try to get it from the AJAX API, but there's not a public API for this.

  3. I don't understand you question here. Could you clarify and I'll update my answer?

  1. 没有 API。然而,有办法做到这一点,但都可能有问题。如果你愿意使用 Python,我最近发现了一个脚本来完成它。

  2. Google 曾经有一个 SOAP API,但现在没有了。有些人刮掉了结果。您可以尝试从 AJAX API 获取它,但没有用于此的公共 API。

  3. 我不明白你在这里提问。你能澄清一下,我会更新我的答案吗?

回答by Victor Pudeyev

Try this guy: http://www.fourmilab.ch/webtools/PageRank/

试试这个人:http: //www.fourmilab.ch/webtools/PageRank/

although written in perl, you can issue a call to your OS from PHP to run this, then further process the output. Make sure to put http:// at the beginning your your query, and not hit the google server more often than once per second, and sanitize (urlencode) the user input if users will be using this.

尽管是用 perl 编写的,但您可以从 PHP 调用您的操作系统来运行它,然后进一步处理输出。确保将 http:// 放在您的查询的开头,并且每秒访问 google 服务器的频率不要超过一次,如果用户将使用它,请清理(urlencode)用户输入。