请问小偷程序如何判断目标网址超时无法访问?
Function GetPage(Path)
t = GetBody(Path)
GetPage=BytesToBstr(t,"utf-8")
End function
Function GetBody(url)
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False, "", ""
.Send
GetBody = .ResponseBody
End With
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
strPage=GetPage(weburl)
请问小偷程序如何判断目标网址超时无法访问? 最好能在上面我给的代码中改改增加这个判断的功能, 谢谢了