<%
‘取得远程网页二进制源代码
Function getBoy(url)
‘on error resume next
Set objXml = Server.CreateObject(“Microsoft.XmlHttp”)
with objXml
.open “get”,url,false,””,””
.send
getBoy = .responsebody
end with
getBoy = BytesToBstr(GetBoy,”utf-8″)
‘response.Write(getBoy)
Set objXml = nothing
end function
‘处理二进制流代码
Function BytesToBstr(strBody,CodeBase)
dim objStream
set objStream = Server.CreateObject(“Adodb.Stream”)
objStream.Type = 1
objStream.Mode =3
objStream.Open
objStream.Write strBody
objStream.Position = 0
objStream.Type = 2
objStream.Charset = CodeBase
BytesToBstr = objStream.ReadText
objStream.Close
set objStream = nothing
End Function
%>