通过站长站获取网站百度权重的PHP代码 function br($s){ $baidu="http://mytool.chinaz.com/baidusort.aspx?host=".$s; $site=file_get_contents($baidu); preg_match("/font color=\"\"(.*)\/font/i",$site,$count); return $count[1][0];}$
          function br($s){
    $baidu="http://mytool.chinaz.com/baidusort.aspx?host=".$s;
    $site=file_get_contents($baidu);
    preg_match("/<font color=\"\">(.*)<\/font>/i",$site,$count);
    return $count[1][0];
}
$br=br("http://xxx.com");
echo $br;  
        
        