//获取网站百度权重搜狗谷歌PR
//神龙QQ:29295842
/*获取百度权重*/
functionbaidu_br($s){
$baidu="/baidusort.aspx?host=".$s;
$site=file_get_contents($baidu);//file_get_contents(urlencode($baidu));
preg_match_all('((.*?))',$site,$count);
//print_r($count);
if(!empty($count[1][0])){
return$count[1][0];
}
else{
return"!";
}
return$count[1][0];
}
/*搜狗*/
functionsogo($s){
$sogo="http://rank./sogourank.php?url=".$s;
$site=file_get_contents($sogo);
preg_match_all('(sogourank=(.*?)$)',$site,$count);
if(!empty($count[1][0])){
return$count[1][0];
}
else{
return"!";
}
return$count[1][0];
}
/*google*/
functionapp_hash_url($url){
$seed="MiningPageRankisAGAINSTGOOGLE'STERMSOFSERVICE.";
$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);
}
function get_domain($url){ //获取主域名
//$url = "/plug/tags/?tag=PHP";
preg_match('@^(?:http://)?([^/]+)@i', $url, $matches);
return $matches[1];
//echo $host;
}
function google_pr($url){
try
{
$url=get_domain($url); //获取主域名
//echo $url;
$PR_CH=app_hash_url($url);
$url='/tbr?client=navclient-auto&features=Rank&q=info:'.$url.'&ch='.$PR_CH;
$prtext=file_get_contents($url);
if($prtext!=""){
$pr=explode(":",$prtext);
return $pr[2];
}else{
return "!";
}
return "!";
}
//捕获异常
catch(Exception $e)
{
return "!";
}
}
echo "baidu--".baidu_br('/plus/av.php');
echo "sogo--".sogo('/plus/av.php');
echo "google--".google_pr('/plus/av.php');
?>
1.[文件] br.php~2KB 下载(24)
//获取网站 百度权重 搜狗 谷歌PR
//神龙 QQ:29295842
/*获取百度权重*/
function baidu_br($s){
$baidu="/baidusort.aspx?host=".$s;
$site=file_get_contents($baidu); //file_get_contents(urlencode($baidu));
preg_match_all('((.*?))', $site,$count);
//print_r($count);
if(!empty($count[1][0])) {
return $count[1][0];
}
else {
return "!";
}
return $count[1][0];
}
/*搜狗 */
function sogo($s){
$sogo="http://rank./sogourank.php?url=".$s;
$site=file_get_contents($sogo);
preg_match_all('(sogourank=(.*?)$)', $site,$count);
if(!empty($count[1][0])) {
return $count[1][0];
}
else {
return "!";
}
return $count[1][0];
}
/*google*/
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);
}
function get_domain($url){ //获取主域名
//$url = "/plug/tags/?tag=PHP";
preg_match('@^(?:http://)?([^/]+)@i', $url, $matches);
return $matches[1];
//echo $host;
}
function google_pr($url){
try
{
$url=get_domain($url); //获取主域名
//echo $url;
$PR_CH=app_hash_url($url);
$url='/tbr?client=navclient-auto&features=Rank&q=info:'.$url.'&ch='.$PR_CH;
$prtext=file_get_contents($url);
if($prtext!=""){
$pr=explode(":",$prtext);
return $pr[2];
}else{
return "!";
}
return "!";
}
//捕获异常
catch(Exception $e)
{
return "!";
}
}
echo "baidu--".baidu_br('/plus/av.php');
echo "sogo--".sogo('/plus/av.php');
echo "google--".google_pr('/plus/av.php');
?>