#12004/10/2 10:47:43
小偷程序
<%
Function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
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
Dim Url,Html
url="www.sina.com.cn"
Html = getHTTPPage(url)
Response.write Html
%>
错误信息
错误类型:
Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/lx/30.asp, line 14, column 12
End Function
-----------^
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
请高手指点下,我没看出来那里有错误。但是为什么函数调用不好使呢?