< ?php function GetPageRank($q,$host='toolbarqueries.google.com',$context=NULL) { $seed = "Mining PageRank is AGAINST GOOGLE'S TERMS OF SERVICE. Yes, I'm talking to you, scammer."; $result = 0x01020345; $len = strlen($q); for ($i=0; $i<$len; $i++) { $result ^= ord($seed{$i%strlen($seed)}) ^ ord($q{$i}); $result = (($result >> 23) & 0x1ff) | $result < < 9; } $ch=sprintf('8%x', $result); $url='http://%s/tbr?client=navclient-auto&ch=%s&features=Rank&q=info:%s'; $url=sprintf($url,$host,$ch,$q); @$pr=file_get_contents($url,false,$context); return $pr?substr(strrchr($pr, ':'), 1):false; } if (isset($_GET['q'])) { echo "Page Rank: ".GetPageRank($_GET['q']); } ?>