Function: encode a URL. the URL does not contain quot;. for example, the code of phprm. comphp to obtain the googlepr value is as follows :? Phpf... function: encode the URL
Parameter description: $ web_url does not contain "http: //", for example, phprm.com
The php code for obtaining the google pr value is as follows:
> 23) & 0x1FF) | $Result << 9; } return sprintf("8%x", $Result);}
Function:
Description of obtaining pagerank parameters:
$ Domain: the website domain name does not contain "http: //". the code is as follows:
function pagerank($domain) {$StartURL = "http://toolbarqueries.google.com/tbr?client=navclient-auto&features=Rank:&q=info:";// $StartURL = "http://www.google.com/search?client=navclient-auto&features=Rank:&q=info:";$GoogleURL = $StartURL . $domain . ' &ch=' . HashURL($domain);$fcontents = file_get_contents("$GoogleURL");$pagerank = substr($fcontents, 9);if (!$pagerank) return "0";else return $pagerank;}
OK. it's actually that simple to use php to get Google's prvalue algorithm. let's test it by yourself. last time, Google's prvalue query interface was changed, the code above has been modified to use the latest interface of Google PR query.