下面二個函數是用來獲取網站收錄查詢的源碼了,這是用來查詢baidu快照與收錄頁面哦。
下面二個函數是用來獲取網站收錄查詢的源碼了,這是用來查詢baidu快照與收錄頁面哦。
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,"找到相關網頁約", "篇" ));
if ($PageNum == "") $PageNum = str_replace(",","", cut($page,"找到相關網頁", "篇"));
if ($PageNum == "") $PageNum = "0";
echo "<a href='".$url."' target='_blank'>$PageNum</a>";
}
function baidukz()
{
global $murl,$furl;
$url = "http://www.baidu.com/s?wd=$furl";
$page = file_get_contents($url);
$kzdate = "0";
$kzdate = cut($page,"<font color=#008000>$furl", "</font>" );
if($kzdate!=""){
/// 37K 2008-9-13
$kzarray = explode ('K', $kzdate);
$kzdate = trim($kzarray[1]);
if(trim($kzarray[1])!=""){
echo "<a href='".$url."' target='_blank'>$kzdate</a>";
}
}
else{
echo escape("無");
}
}