Copy the Code code as follows:
/*
Search Google "Shenzhen photography studio", Lan Horizon LANSJ ranking position; 2009-10-11
Lost63.com Original
Search in the first 30 pages
*/
$page = 30; Number of pages
$domain = "lansj.com"; Domain name
$domain = "lost63.com";
for ($n =0; $n <= $page; $n + +) {
$url = ' http://www.google.cn/search?hl=zh-CN&newwindow=1&q=%E6%B7%B1%E5%9C%B3%E6%91%84%E5%BD%B1%E5%B7%A5 %e4%bd%9c%e5%ae%a4&start= '. $n. ' 0&sa=n ';
$url = ' http://www.google.cn/search?hl=zh-CN&lr=&newwindow=1&q=%E8%BF%B7%E5%A4%B1%E8%B7%AF%E4%B8% 8a&start= '. $n. ' 0&sa=n ';
$file =fopen ($url, "R");
while (!feof ($file))
{
$result. =fgets ($file, 9999);
}
if (Strpos ($result, $domain) ==true) {
Echo ' was found on page $n.
';
$n = $page;
}else{
Echo ' first ' $n. ' Page not found
';
}
Fclose ($file);
}
?>
The above describes the world search engine rankings with PHP query search engine ranking location of the code, including the World search engine rankings of content, I hope that the PHP tutorial interested in a friend helpful.