有人在互联网上公开了可用于检查百度排名asp的代码
发布时间:2023-09-08 14:37:12 所属栏目:Asp教程 来源:
导读:以下是源码,请命名为.asp文件
复制代码 代码如下:
<%
bpn = request("bpn")
if(bpn = "") then
bpn = "0"
end if
intbpn = cint(bpn)
if request("action") = "1" then
word
复制代码 代码如下:
<%
bpn = request("bpn")
if(bpn = "") then
bpn = "0"
end if
intbpn = cint(bpn)
if request("action") = "1" then
word
以下是源码,请命名为.asp文件 复制代码 代码如下: <% bpn = request("bpn") if(bpn = "") then bpn = "0" end if intbpn = cint(bpn) if request("action") = "1" then word = request("word") url = request("url") if word <> "" then getCategories() if url <> "" then getCategories2() end if end if end if Function getCategories() response.write("<b>'"&word&"' 关键词在百度搜索排名中,前10位网站!</b><br>") on error resume next Dim oXMLHTTP Dim oCategories Dim BodyText Dim Pos,Pos1 Set oXMLHTTP = CreateObject("Microsoft.XMLHTTP") oXMLHTTP.open "GET","http://www.baidu.com/baidu?word="&word,False oXMLHTTP.send BodyText=oXMLHTTP.responsebody BodyText=BytesToBstr(BodyText,"gb2312") Pos=Instr(BodyText,"<body") pos1=Instr(BodyText,"</body>") BodyText=mid(BodyText,pos,pos1) BodyText=split(BodyText,"<table") st = 5 for i = 1 to 10 thei = st + i Pos=Instr(BodyText(thei),"<td") pos1=Instr(BodyText(thei),"</td>") Body=mid(BodyText(thei),pos,len(BodyText(thei))-pos) body1=split(body,"<br>") title = body1(0) theurl = body1(2) theurl = replace(theurl,"上的更多结果","") response.write ("T:"& title) response.write ("<br>") response.write ("U:"& theurl) response.write ("<br><hr>") next Set oXMLHTTP = Nothing if err.number<>0 then response.write "出错了,错误描述:"&err.description & "<br>错误来源"& err.source response.End() end if End Function Function getCategories2() on error resume next Dim oXMLHTTP ' As Object Dim oCategories ' As Object Dim BodyText Dim Pos,Pos1 Set oXMLHTTP = CreateObject("Microsoft.XMLHTTP") (编辑:聊城站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐