<html>
<title>查百度—百度網站權重SEO工具查詢</title>
<meta http-equiv=Content-Language content=zh-cn>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name=keywords content="百度關鍵字,關鍵字排名,關鍵字查詢">
<meta name="description" content="百度關鍵字查詢系統的主要功能是:查詢百度搜尋引擎教程某個關鍵字的搜尋結果中是否包含您的網頁,並且能夠查詢出您的網頁排在第幾頁.">
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<style type="text/css教程">
<!--
.STYLE1 {color: #666666}
.STYLE3 {font-size: 12px}
.STYLE6 {color: #0000FF}
.STYLE7 {color: #333333}
-->
</style>
<script language="JavaScript">
function check_value()
{
if (document.myform.kw.value=="")
{
alert("對不起,關鍵字不可為空!");
document.myform.kw.focus();
return false;
}
if (document.myform.url.value=="")
{
alert("對不起,網址不可為空!");
document.myform.url.focus();
return false;
}
}
</script>
<body>
<H1>百度網站權重(SEO)查詢工具</H1>
<br>
<form id="myform" name="myform" method="get" action="so.php教程" target="_blank" onSubmit="return check_value();">
<label>請輸入關鍵字:
<input name="kw" type="text" size="30" />
</label>
<p>
<label>請輸入網址:
<input name="url" type="text" size="30" />
</label>
<br>
<span class="STYLE1"> </span></p>
<p>
<label>查詢深度:
<input type="text" name="depth" size="30" />
</label>
<br>
<span class="STYLE1"> <span class="STYLE3">查詢深度指的是要查詢的總頁數,預設為10頁度</span></span></p>
<p>
<label>
<input type="submit" name="Submit" value="查詢我網站的權重" />
</label>
</p>
</form>
<h5>
<span class="STYLE7 STYLE3">百度關鍵字查詢系統的主要功能是:查詢百度搜尋引擎某個關鍵字的搜<br>
索結果中是否包含您的網頁,並且能夠查詢出您的的網頁排在第幾頁.如果排名較差可以考慮適當的再憂化一下您的網站了。<br>
</span><br>
近日將會推出站長和百度的更多實用功能,敬請關注!
</h5>
</body>
</html>
//php處理代碼
<?php
function get_microtime()
{
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = get_microtime();
set_time_limit(0);
$kw=$_GET["kw"];
$url=$_GET["url"];
$depth=$_GET["depth"];
$next=1;$pn=0;$flag=0;$n=1;$ps教程=0;
$baseurl="http://www.baidu.com/s?";
$kw=str_replace("+","%2B",$kw);
$kw=str_replace(" ","%20",$kw);
if($depth==""||$depth<=0) $depth=10;
if($depth>76) $depth=76;
echo "<title>百度網站關鍵字權重查詢 -- ".$kw."</title>";
echo "<H2>百度網站關鍵字權重查詢結果</H2>";
//echo "<br>";
echo "<br>查詢深度為:<strong>".$depth."</strong><br>";
while($next==1)
{
$baidu_url=$baseurl."lm=0&si=&rn=10&tn=wangcong&ie=gb2312&ct=0&wd=".$kw."&pn=".$pn."&cl=3";
$str=file_get_contents($baidu_url);
$baidu_url=str_replace("%20","+",$baidu_url);
if(strpos($str,$url))
{
if($n==1) echo "在百度中尋找關鍵字:'<strong>".$kw."</strong>',來自'<strong>".$url."</strong>'的結果有:<br><br>";
$pagenum=$pn/10+1;
echo "<br> 第".$n."條結果, ";
echo "在百度搜尋結果中排在第".$pagenum."頁";
echo "<br>";
echo " <a href=".$baidu_url." target=blank>點此查看</a>";
echo "<br><br>";
$flag=1;
$n=$n+1;
}
$pn=$pn+10;
$ps=$ps+1;
if($ps==$depth) $next=0;
if(!strpos($str,"<font size=3>下一頁</font>")) $next=0; //判斷有沒有下一頁;
}
$time_end = get_microtime();
$time = $time_end - $time_start;
if($flag==0) echo "<br>在當前的深度條件下沒有找到來自 <strong>".$url."</strong> 的結果,您的憂化還有待進步,您可以嘗試加大查詢深度.<br><br>";
$n=$n-1;
echo "<br><strong>統計資訊:</strong>一共找了".$ps."頁,找到".$n."條相關結果,耗時:".$time."秒.<br><br><br>";
?>