Home > Backend Development > PHP Tutorial > PHP included query baidu snapshot and included page_PHP tutorial

PHP included query baidu snapshot and included page_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-20 11:06:22
Original
1090 people have browsed it

The following two functions are used to obtain the source code of website inclusion query. They are used to query Baidu snapshots and inclusion pages.

The following two functions are used to obtain the source code of website inclusion query. They are used to query Baidu snapshots and included pages.

function baidu()
{
global $murl,$furl;
$url = "http://www.baidu.com/s?wd=site:$furl" ;
$page = file_get_contents($url);
$PageNum = "0";
$PageNum = str_replace(",","",cut($page,"Find related web pages about", "Page" ));
if ($PageNum == "") $PageNum = str_replace(",","", cut($page,"Find related web pages", "Page"));
if ($PageNum == "") $PageNum = "0";
echo "$PageNum";
}

function baidukz()
{
global $murl,$furl;
$url = "http://www.baidu.com/s?wd=$furl ";
$page = file_get_contents($url);
$kzdate = "0";
$kzdate = cut($page,"$furl", "< ;/font>" );
if($kzdate!=""){
/// 37K 2008-9-13
$kzarray = explode ('K', $kzdate);
$kzdate = trim($kzarray[1]);
if(trim($kzarray[1])!=""){
echo "$kzdate";
}

}
else{
echo escape("None");
}
}


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445053.htmlTechArticleThe following two functions are used to obtain the source code of website inclusion query, which are used to query Baidu snapshot and inclusion Page. The following two functions are used to obtain the source code of website inclusion query,...
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