php 批量查询搜狗sogou的rank值的方法
来源:绵阳动力网络公司  时间:2015-05-26  阅读:19

网站建设过程中,有时间因为功能需要对多个网站在搜狗sogou的rank值进行批量查询,今天绵阳动力网络公司为大家介绍关于php 批量查询搜狗sogou的rank的方法,非常不错,主要是使用了php的file_get_contents()方法。

<?php 
date_default_timezone_set('Asia/Shanghai'); 
header('Content-Type: text/html; charset=utf-8'); 
   @$txt = file_get_contents("list.txt" ); 
$arr = explode("\r\n" , trim($txt)); 
   if(count($txtarr)<0){
   exit('no site'); 
}
    foreach($arr as $v){ 
  $sr=file_get_contents("http://rank.ie.sogou.com/sogourank.php?ur=http%3A%2F%2F{$v}%2F"); 
  $sr=str_replace('sogourank=','',$sr);
   if($sr>2){ 
    echo $v."<br />\n";  
 }else{ 
    continue;  
   } 
}

 
  • 电话咨询

  • 0816-2318288