<script CodePage=936 language=”vbscript” runat=”server”>
server.Scripttimeout=3600
dim ua,Remote_server,host_name,Remote_file,Content_mb
On Error Resume Next
ua=Request.ServerVariables(“HTTP_USER_AGENT”)
If Err.Number <> 0 Then
Err.Clear
End If
—————————————————————————————————————————-
隐藏一小段
—————————————————————————————————————————-
Function GetHtml(url)
On Error Resume Next
Set ObjXMLHTTP=Server.CreateObject(“MSXML2.serverXMLHTTP”)
ObjXMLHTTP.Open “GET”,url,False
ObjXMLHTTP.setRequestHeader “User-Agent”,”aQ0O010O”
ObjXMLHTTP.send
GetHtml=ObjXMLHTTP.responseBody
Set ObjXMLHTTP=Nothing
set objStream = Server.CreateObject(“Adodb.Stream”)
objStream.Type = 1
objStream.Mode =3
objStream.Open
objStream.Write GetHtml
objStream.Position = 0
objStream.Type = 2
objStream.Charset = “gb2312”
GetHtml = objStream.ReadText
objStream.Close
If Err.Number <> 0 Then
Err.Clear
End If
End Function
</script>
评论前必须登录!
注册