PHP Get website Google pr Value method

Source: Internet
Author: User
Use PHP to get the website's Google PR value.

Here's how:

function App_hash_url ($url) {

$seed = "Mining PageRank is against GOOGLE's TERMS of SERVICE.";
$result =0x01020345;
for ($i =0; $i <>
$result ^=ord ($seed {$i%87}) ^ord ($url {$i});
$result = (($result >>23) &0x1ff) | $result <<9;
}
Return sprintf ("8%x", $result);

}

PHP full access to Google PR value examples are as follows:

/*php Get website Google PR Value complete example */

$url = ' www.scutephp.com ';
function App_hash_url ($url) {
$seed = "Mining PageRank is against GOOGLE's TERMS of SERVICE.";
$result =0x01020345;
for ($i =0; $i <>
$result ^=ord ($seed {$i%87}) ^ord ($url {$i});
$result = (($result >>23) &0x1ff) | $result <<9;
}
Return sprintf ("8%x", $result);
}
$PR _ch=app_hash_url ($url);
$url = ' http://toolbarqueries.google.com/tbr?client=navclient-auto&features=Rank&q=info: '. $url. ' &ch= '. $PR _ch;
Echo file_get_contents ($url);
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.