本系统有道的相关关键词搜索查询工具,为站长提供详细相关关键字查询。如遇查询失败,请多刷新几次即可。程序开发:阿里查询
<% If request("do")<>"" Then %>
| 您查询的词是:" style="color:#FF0000" target="_blank"><%=request("do") %> |
<%
function getHTTPPageutf8(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPageutf8=bytesToBSTR(Http.responseBody,"utf-8")
set http=nothing
if err.number<>0 then err.Clear
end function
'2、转换乱玛,直接用xmlhttp调用有中文字符的网页得到的将是乱玛,可以通过adodb.stream组件进行转换
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function GetKey(HTML,Start,Last)
filearray=split(HTML,Start)
filearray2=split(filearray(1),Last)
GetKey=filearray2(0)
End Function
Url="http://www.youdao.com/search?q="&request("do")
Html = getHTTPPageutf8(Url)
'获取指定页面的全部数据
On Error Resume Next
start=Instr(html,"")
over=Instr(html,"")
body=mid(html,start+26,over-start-1)
dim dos
dos=request("do")
%>
| 关键字 |
baidu相关关键字 |
google相关关键字 |
关键字搜索次数 |
google趋势图 |
| <%=dos %> |
查看 |
查看 |
搜索次数 |
查看趋势图 |
<%
'循环读取
dim guanjianzi
vote=split(body,"")
for i= 0 to ubound(vote)-1
temp=Trim(vote(i))
guanjianzi=GetKey(temp,"","")
If len(guanjianzi)<1 Then
Else %>
| <%=guanjianzi %> |
查看 |
查看 |
搜索次数 |
查看趋势图 |
<% End If
next
%>
| 技术支持:阿里查询 |
<% End If %> |
|