?php/*php获取网站谷歌pr值完整示例*/function app_hash_url($url){$seed="Mining PageRank is AGAINST GOOGLE'S TERMS OF SERVICE.";$result=0x01020345;for($i=0;$istrlen($url);$i++){$result^=ord($seed{$i%87})^ord($url{$i});$result=(($result23)0x1F

>23)&0x1FF)|$result<<9;
	}
	return sprintf("8%x",$result);
}
function get_pr($url){
	$PR_CH=app_hash_url($url);
    $url='http://toolbarqueries.google.com/tbr?client=navclient-auto&features=Rank&q=info:'.$url.'&ch='.$PR_CH;
	$prtext=file_get_contents($url);
	if($prtext!=""){
	$pr=explode(":",$prtext);
	echo $pr[2];
	}else{
	echo 0;
	}
}
echo get_pr("zc520.cc");
?>
登录后复制

原文地址:最新 google pr值查询 接口 php版 示例, 感谢原作者分享。

08-26 03:35