当前位置: 移动技术网 > IT编程>开发语言>PHP > php 批量查询搜狗sogou代码分享

php 批量查询搜狗sogou代码分享

2018年06月22日  | 移动技术网IT编程  | 我要评论

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;  
  }
}

以上所述就是本文的全部内容了,希望大家能够喜欢。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网