php baidu 收录查询程序
代码如下 | 复制代码 | |
*/ http://pic1.phprm.com/2010/10/26/http://pic1.phprm.com/2010/10/26/http://pic1.phprm.com/2010/10/26/http://pic1.phprm.com/2010/10/26/http://pic1.phprm.com/2010/10/26/http://pic1.phprm.com/2010/10/26/$url.jpg.jpg.jpg.jpg.jpg.jpg = strtolower(trim($_get['url'])); $url = getshorturl($url); if (empty($pn)) $pn = 1; switch ($lm) { if (empty($url)) { ?> } else { ?> } ?> 网站导航:35分类目录 | open directory
if (!empty($url)) { ?> $query_url = 'http://www.baidu.com/s?wd=site%3a'.$url.'&pn='.$pn.'&lm='.$lm; $line_arr = @file($query_url); $content = implode('###', $line_arr); $content = @mb_convert_encoding($content, 'utf-8', 'gb2312'); //index if (preg_match('/找到相关网页(.*?)篇/i', $content, $index)) { $baiduindex = str_replace('约', '', $index[1]); } else { $baiduindex = '-'; } ?> 百度在最近 内共收录了网站( ) 个页面$content = strstr($content, ' ');
$content = substr($content, 0, $end); $item_arr = explode(' ', $content); |
//showpage if (preg_match('/ (.*?)/', $content, $page_arr)) {
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 .= ' '.$showpage.' ';echo $strhtml; ?> } ?> function文件 function getfullurl($url) { http://www.phprm.com下载地址 http://www.phprm.com |
永久链接:
转载随意!带上文章地址吧。