时间:2021-05-18
<%
Function bytes2BSTR(vIn)
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = ubb(strReturn)
End Function
Function dq(key)
dim XmlHttp
set XmlHttp = CreateObject("Microsoft.XMLHTTP")
XmlHttp.Open "GET","http:///s?wd="&key&"&pn="&request("pn"), false
XmlHttp.setRequestHeader "Content-Type","text/XML"
XmlHttp.Send
dq = bytes2BSTR(XmlHttp.responseBody)
End Function
Function BR(Str)
Str = Replace(Str,"{br}","<br>")
Str = Replace(Str,vbcrlf,"<br>")
Str = Replace(Str,"<br> <br>","<br>")
Str = Replace(Str,"<br><br>","<br>")
Str = Replace(Str,"<br><br>","<br>")
BR = Str
End Function
function ubb(str)
if instr(str,"找到相关网页") = 0 then
ubb = "没有搜索到任何内容"
exit function
end if
str = Replace(str,vbcrlf,"{br}")
str = Replace(str,"<br>","{br}")
str = Replace(str,"</td>","</td>"&vbcrlf)
str = Replace(str,"<td",vbcrlf&"<td")
dim re,Match,Matches
set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern=".*\<td class=f>(.*)\<\/td>"
Set Matches = re.Execute(str)
For Each Match in Matches
ubb=ubb&BR(Match.value)
next
re.Pattern="(\- \<a .[^\<]*>百度快照\<\/a>)"
ubb = re.replace(ubb,"")
re.Pattern="(\<a class=""m"".[^\<]*>.[^\<]*\<\/a>)"
ubb = re.replace(ubb,"")
re.Pattern="(\<font color=#008000>.[^\<]*\<\/font>)"
ubb = re.replace(ubb,"<hr>") '每一条信息的间隔
ubb = Replace(ubb,"<td class=f>","")
ubb = Replace(ubb,"</td>","")
ubb = BR(UBB)
re.Pattern="(找到相关网页.*秒)"
Set Matches = re.Execute(str)
set Match = Matches(0)
ubb = ubb & Match & "<br>"
str = Replace(str,"</div>","</div>"&vbcrlf)
re.Pattern="\<div class=""p"">(.*)\<\/div>"
Set Matches = re.Execute(str)
set Match = Matches(0)
Dim TheLink
TheLink = Match
re.Pattern="href=s?(.[^>]*)"
TheLink = re.replace(TheLink,"href=""$1""")
ubb = ubb & TheLink
end function
if len(request("wd")) > 0 then
response.write dq(request("wd"))
end if
%>
<form method=post action="?">
<input type="text" name="wd"> <input type="submit">
</form>
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
例子,php百度天气小偷程序。复制代码代码如下:
最近发现知道和问问小偷的版本越来越多了!!看过一个百度小偷的网站也达到了pr6。收录十万多!!在经过荐礼啦四十天的实践之后发现百度对这个确实挺友好的。从网站访问
百度搜索手机客户端版是百度推出的一款方便手机用户随时随地使用百度搜索服务的应用。依托百度网页、百度图片、百度新闻、百度知道、百度百科、百度地图、百度音乐、百度视
百度知道怎么激活百度派?激活百度派方法。百度派是百度旗下高质量话题讨论社区,在手机版的百度知道里也有百度派,那要怎么激活百度派呢?,下面就教大家激活百度派的方法
蓝天算法 继百度绿萝算法、百度石榴算法、百度星火计划、百度天网算法、百度冰桶算法,百度最新推出了一个“蓝天算法”,听到百度最新推出