时间:2021-05-25
以下是源码,请命名为.ASP文件.
复制代码 代码如下:
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">
<%
ifrequest("action")="1"then
word=request("word")
url=request("url")
ifword<>""then
getCategories()
ifurl<>""then
getCategories2()
endif
endif
endif
FunctiongetCategories()
response.write("<b>'"&word&"'关键词在Google搜索排名中,前10位网站!</b><br>")
onerrorresumenext
DimoXMLHTTP
DimoCategories
DimBodyText
DimPos,Pos1
SetoXMLHTTP=CreateObject("Microsoft.XMLHTTP")
http="http:///search?q="&word&"&hl=zh-CN&start="&start
'response.write(strurl&"<br>")
oXMLHTTP.open"GET",strurl,False
oXMLHTTP.send
BodyText=oXMLHTTP.responsebody
BodyText=BytesToBstr(BodyText,"gb2312")
Pos=Instr(BodyText,"<body")
pos1=Instr(BodyText,"</body>")
BodyText=mid(BodyText,pos,pos1)
Pos=Instr(BodyText,"<div>")
BodyText=Mid(BodyText,Pos)
pos1=Instr(BodyText,"</div>")
BodyText=mid(BodyText,1,pos1)
'response.write("::::"&BodyText&"::::")
BodyText=split(BodyText,"<pclass=g>")
fori=1to10
Pos=Instr(BodyText(i),"<spandir=ltr>")
theu=Mid(BodyText(i),Pos)
pos1=Instr(theu,"</span>")
theu=mid(theu,1,pos1-1)
'response.write(theu)
Pos3=Instr(theu,url)
ifPos3>0then
pp=start+i
out=1
ExitFor
endif
next
ifout=1orstart=90then
exitdo
endif
start=cint(start)+10
loop
ifpp<>0then
response.write("<br><br>网站<b>'"&url&"'</b>在搜索关键词<b>'"&word&"'</b>时在Google中排名名次第<b>"&pp&"</b>位")
else
response.write("<br><br>网站<b>'"&url&"'</b>在搜索关键词<b>'"&word&"'</b>时在Google中排名名次<fontcolor=red>未在前100名内</font>")
endif
SetoXMLHTTP=Nothing
iferr.number<>0then
response.write"出错了,错误描述:"&err.description&"<br>错误来源"&err.source
response.End()
endif
EndFunction
FunctionBytesToBstr(body,Cset)
dimobjstream
setobjstream=Server.CreateObject("adodb.stream")
objstream.Type=1
objstream.Mode=3
objstream.Open
objstream.Writebody
objstream.Position=0
objstream.Type=2
objstream.Charset=Cset
BytesToBstr=objstream.ReadText
objstream.Close
setobjstream=nothing
EndFunction
PublicFunctionHTMLEncode(fString)
IfNotIsNull(fString)Then
fString=replace(fString,">",">")
fString=replace(fString,"<","<")
fString=Replace(fString,CHR(32),"")'
fString=Replace(fString,CHR(9),"")'
fString=Replace(fString,CHR(34),""")
fString=Replace(fString,CHR(39),"'")'单引号过滤
fString=Replace(fString,CHR(13),"")
fString=Replace(fString,CHR(10)&CHR(10),"</P><P>")
fString=Replace(fString,CHR(10),"<BR>")
HTMLEncode=fString
EndIf
EndFunction
%>
<title>关键字,网站在Google中排名查询</title>
<hr><hr><b>
关键字,网站在Google中排名查询:
<formname="form1"method="post"action="?action=1">
网址:
<inputtype="text"name="url">
关键字
<inputtype="text"name="word">
<inputtype="submit"name="Submit"value="提交">
</form>
<b>
<script>
<!--
functionss(w,id){window.status=w;returntrue;}
functioncs(){window.status='';}
functionclk(url,ct,cd,sg){if(document.images){varu="";if(url)u="&url="+escape(url).replace(/\+/g,"%2B");newImage().src="/url?sa=T&ct="+escape(ct)+"&cd="+escape(cd)+u+"&ei=r9vyQ9ypE5GsoQKL4KDyCg"+sg;}returntrue;}
functionga(o,e){if(document.getElementById){vara=o.id.substring(1);varp="",r="",t,f,h;varg=e.target;if(g){t=g.id;f=g.parentNode;if(f){p=f.id;h=f.parentNode;if(h)r=h.id;}}else{h=e.srcElement;f=h.parentNode;if(f)p=f.id;t=h.id;}if(t==a||p==a||r==a)returntrue;document.getElementById(a).href+="&ct=bg";window.open(document.getElementById(a).href,'nw')}}
//-->
</script>
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
以下是ASP程序显示所有环境变量的源码:
用途:文章表内文章关键字查询查询格式:百度google 百度好还是google好 百度+google (也可不输入条件全部查询)0Then'关键词中多个空格的
今天Google宣布了一项重大的Google搜索排名算法改进,你可以试试搜索“exhibitionsatamnh”,看看结果,我当时
google关键字:inurl:news_more.asp?lm2=(关键字很多的自己定义吧)1、/admin/admin_news_pl_view.asp?i
推荐两文:1、支付宝购买流程2、支付宝卖家流程支付宝接口提供最新的ASP、ASP.NET、PHP、JSP等目前网络上最流行的源码包文件,程序员可以下载后按本文介