百度在最近 内共收录了网站( ) 个页面
$content = strstr($content, '
$content = substr($content, 0, $end);
$item_arr = explode('
//showpage
if (preg_match('/
(.*?)/', $content, $page_arr)) {
$showpage = str_replace('s?wd=site%3a', '?url=', $page_arr[1]);
$showpage = str_replace('[', '', $showpage);
$showpage = str_replace(']', '', $showpage);
}
$i = 0;
$strhtml = '
- ';
- ';
$strhtml .= ''.$i.'.'.$sitename.'';
$strhtml .= ''.$sitedesc.'
';
$strhtml .= ''.$siteltime.' - 百度快照 ';
$strhtml .= ' ';
foreach ($item_arr as $item) {
if (preg_match('/(.*?)
(.*?)(.*?) - /i', $item, $siteinfo)) {
$sitename = $siteinfo[3];
$siteurl = $siteinfo[2];
$sitedesc = $siteinfo[4];
$siteltime = $siteinfo[5];
$sitecache = $siteinfo[6];
$strhtml .= '
}
$i++;
}
$strhtml .= '
$strhtml .= '
echo $strhtml;
?>
}
?>
function文件
function getfullurl($url) {
if ($url != "") {
$url_parts = parse_url($url);
if ($url_parts['scheme'] == "") {
$url = "http://".$url;
}
}
return $url;
}
function getshorturl($url) {
if ($url != "") {
$url_parts = parse_url($url);
if ($url_parts['host'] == "") {
$url = $url_parts['path'];
} else {
$url = $url_parts['host'];
}
}
return $url;
}
function format_number($number) {
if ($number == '') return "-";
$nlen = strlen($number);
while ($nlen > 3) {
$fnumber = ",".substr($number, $nlen - 3, 3).$fnumber;
$number = substr($number, 0, -3);
$nlen = strlen($number);
}
if ($nlen $fnumber = $number.$fnumber;
}
return $fnumber;
}
?>
http://www.phprm.com下载地址
http://www.phprm.com