222.218.152.196
<%
function getHTTPPage(url)
on error resume next
dim http
set http=Server.createobject("Msxml2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then exit function
getHTTPPage=bytes2BSTR(Http.responseBody)
set http=nothing
if err.number<>0 then err.Clear
end function
Function bytes2BSTR(vIn)
dim strReturn
dim i,ThisCharCode,NextCharCode
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 = strReturn
End Function
strContent = getHTTPPage("http://ent.163.com/ent_2003/level2/music0402.html")
strContent = replace(strContent,VBcrlf,"")
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<table width=99% cellspacing=0 cellpadding=5 border=0 align=center>.+?</table>"
strContent=trim(strContent)
Set Matches =objRegExp.Execute(strContent)
For Each Match in Matches
bb= bb &Match.Value
response.write "<br>"
Next
%>
<<%=bb%>
[此贴子已经被作者于2004-8-2 11:28:17编辑过]