利用php获取网站的谷歌pr值。
方法如下:
function app_hash_url($url){
$seed=mining pagerank is against google's terms of service.;
$result=0x01020345;
for($i=0;$i>23)&0x1ff)|$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);