Heim  >  Artikel  >  Backend-Entwicklung  >  php 批量查询搜狗sogou代码分享_PHP教程

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

WBOY
WBOYOriginal
2016-07-13 09:53:55897Durchsuche

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

   本文给大家分享的是使用php实现批量查询搜狗的实例代码,非常的简单实用,有需要的小伙伴可以参考下。

  php 批量查询搜狗sogou的rank,非常不错,主要是使用了php的file_get_contents()方法。

  ?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

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)

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."
\n";

}else{

continue;

}

}

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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1000066.htmlTechArticlephp 批量查询搜狗sogou代码分享 本文给大家分享的是使用php实现批量查询搜狗的实例代码,非常的简单实用,有需要的小伙伴可以参考下。...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn