完美百度收录查询程序
该程序包括以下文件:
index.php
<?php require_once('inc.php'); require_once('config.php'); $a=$_GET['page']; $b=$_GET['wd']; $c=$_GET['long']; if (!$a) { $a=1; } $TheUrl="http://www.baidu.com/s?lm=".$c."&si=&rn=20&tn=baiduadv&ie=gb2312&ct=0&wd=site%3A".$b."&pn=".$a."&cl=3"; $TheThie=GetPage($TheUrl); $TheBody=GetContent($TheThie,'<DIV id=ScriptDiv></DIV>','</div><br>'); $total=GetContent($TheThie,"相关网页","篇"); $TheBody=str_replace("百度快照","",$TheBody); $TheBody=preg_replace("<a href=s(.+?)lm=(.+?)&si=&rn=20&tn=baiduadv&ie=gb2312&ct=0&wd=site%3A(.+?)&pn=(.+?)&cl=3>","a href=index.php?wd=$3&long=$2&page=$4",$TheBody); ?> <HTML><HEAD> <TITLE><?echo $sitename;?></TITLE> <meta name="keywords" content="<?echo $keyword;?>"> <meta name="description" content="<?echo $keyword;?>"> <link rel="stylesheet" href="css.css" type="text/css"> <body> <table cellSpacing=5 cellPadding=0 width=770 border=0 align=center> <tr> <td vAlign=top width=760> <table style="WIDTH: 100%" cellSpacing=0 cellPadding=0 width="760" align=left border=0> <tr> <td width="100%" height=33> <table height=30 align=center> <tr valign=center height=40> <td align=center><br> <form name=f action=index.php>网站域名: <input type=text name=wd class=ff size=21 maxlength=100 value=""> <select name=long><option selected=selected value=1>请选择要查询近几天的收录量</option><option value=1>查询百度更新收录情况</option><option value=7>查询最近1星期收录情况 </option><option value=30>查询最近1月收录情况</option><option value=360>查询最近1年收录情况</option><option value=0>查询总的(所有日期)收录情况</option></select> <input type=submit value=立即查询百度近日收录情况!> <br><br><font color=0066ff>本系统可查询百度收录更新情况(能精确到仅昨天收录那些页面,<b>独家功能</b>!其他的系统仅能查询总共收录您网站的情况!)<br><br> </form> </td> </tr> </table> <?php if($b){ ?> <span style="font-size:14px;"><br><center><b>百度在最近<?echo $c;?>日内共收录了网站<?echo $b;?>的<?echo $total;?>页面,具体页面如下:</b></span><br><br><font color=red>查询该站最近几日的收录量: </font><a href=index.php?long=1&wd=<?echo $b;?>><font color=blue><u>昨日</u></font></a> <a href=index.php?long=7&wd=<?echo $b;?>><font color=blue><u>最近1星期</u></font></a> <a href=index.php?long=30&wd=<?echo $b;?>><font color=red><u>最近1个月</u></font></a> <a href=index.php?long=360&wd=<?echo $b;?>><font color=blue><u>最近1年</u></font></a> <a href=index.php?long=0&wd=<?echo $b;?>><font color=red><u>总收录量</u></font></a> <a href=index.php><font color=blue>返回首页查询其他网站</font></a>下次更新:星期四凌晨,注意调整。</center><hr> <table border="0" cellpadding="0" cellspacing="0"> <?echo $TheBody;?></td></tr></table> </td></tr></table> <?php } ?> <br> </body></html>
config.php
<?php $sitename="查百度-百度收录查询"; $keyword="查百度-百度收录查询"; $siteurl='http://cabaidu.net.cn';
inc.php
<?php function GetPage($url){ $getpage=file_get_contents($url); if ($getpage==false) { return "获取内容失败"; } return $getpage; } function GetContent($str,$x,$y){ $tem=strstr($str,$x); return substr($tem,0, strpos($tem,$y)); }
另外,css.css
A { TEXT-DECORATION: none; } A:hover { COLOR: #0099FF; } A:link { color: #205064; } A:visited { color: #006699; } BODY { FONT-FAMILY: ו; FONT-SIZE: 9pt; text-decoration: none; line-height: 150%; background-image: url(bj.jpg); background-repeat: repeat-x; } TD { FONT-FAMILY:ו; FONT-SIZE: 9pt; } Input { FONT-SIZE: 9pt; HEIGHT: 20px; } Button { FONT-SIZE: 9pt; HEIGHT: 20px; } Select { FONT-SIZE: 9pt; HEIGHT: 20px; } .border { border: 1px solid #CCCCCC; } .border2 { background:#fef8ed; BORDER-RIGHT: #999999 1px solid; BORDER-LEFT: #999999 1px solid } .title { background:#f6f6f6; } .title_left { background:url(images/left_bg.gif); } .title_right { background:url(images/right_bg.gif); } .title_main { background:url(Images/jiaodian_bg.gif); } .tdbg{ background:#FFFFFF; line-height: 120%; } .tdbg_left{ background:#fef8ed; line-height: 150%; } .tdbg_right{ background:#EAF1FB; line-height: 150%; } .tdbg_main{ background:#ffffff; line-height: 150%; } .topborder { border-right: 1px solid #6687BA; border-left: 1px solid #6687BA; border-bottom: 1px solid #6595D6; width: 760px; } .nav_top { background-image: url(Skin/1/topbg.gif); } .nav_bottom { background-image: url(Skin/1/bottombg.gif); } .nav_menu { background:url(Skin/1/topBar_bg.gif); } .menu { background-color: #F0F9FF; width:97%; border: 1px; } td.MenuBody { background-color: #F0F9FF; left: 5px; top: 5px; } .bg1 { font-size: 30px; line-height:21px; top: 5px; left: 5px; } .bg2 { line-height: 27px; }
本文地址:http://www.phprm.com/code/b0d92d31d2697b67c714c198c677ea3c.html
转载随意,但请附上文章地址:-)