Home > Backend Development > PHP Tutorial > PHP batch query Sogou code sharing_PHP tutorial

PHP batch query Sogou code sharing_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 09:53:55
Original
981 people have browsed it

PHP batch query Sogou code sharing

This article shares with you the example code of using PHP to query Sogou in batches. It is very simple and practical. Friends in need can refer to it. Down.

php batch query Sogou sogou's rank, very good, mainly using php's file_get_contents() method.

 ?

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("rn" , 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://{$v}/");

$sr=str_replace('sogourank=','',$sr);

if($sr>2){

echo $v."
n";

}else{

continue;

}

}

1

2 3

45 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("rn" , 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://{$v}/");<🎜> <🎜>$sr=str_replace('sogourank=','',$sr);<🎜> <🎜>if($sr>2){ echo $v."
n"; }else{ continue; } }
The above is the entire content of this article, I hope you all like it. http://www.bkjia.com/PHPjc/1000066.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1000066.htmlTechArticlephp Batch Query Sogou Sogou Code Sharing This article will share with you an example code for batch querying Sogou using PHP. It is very It's simple and practical, friends in need can refer to it. ...
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template