% 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/top10.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("") %>