%
dim url,page,i,str
'on error resume next
Function getHTTPPage(url)
' on error resume next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,False
Http.SetRequestHeader "Referer",url
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
End function
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
'===================================================
url="http://top.baidu.com/top_keyword.html"
page= getHTTPPage(url)
Dim Re
Set Re=new Regexp
Re.Multiline=True
Re.Global=True
Re.IgnoreCase=True
Re.pattern="p12blue""\>(([^\<])+?)\<\/"
Set Matches=Re.Execute(page)
For Each N In Matches
Str=str&","&N.value
Next
Str=Replace(str,"p12blue"">","")
str=Replace(str,"","")
response.Write("")
%>
15tm精品实用网址_网址精品_网址大全_网址之家_免费电影_音乐_听歌_精品实用网址站_www.15tm.com/zonghe