日期:2014-05-17 浏览次数:20845 次
Set HTTP = Server.CreateObject("MSXML2.ServerXMLHTTP") HTTP.setTimeouts 10000,10000,10000,30000 HTTP.Open "GET", nSrc, false, "", "" HTTP.Send If HTTP.Readystate = 4 then If HTTP.Status = 200 Then Value = BytesToBSTR(HTTP.ResponseBody,nCharset) Else Value = "" End If Else Value = "" End If Public Function BytesToBSTR(Body,nCharset) 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 = nCharset BytesToBSTR = ObjStream.ReadText ObjStream.Close set ObjStream = Nothing End Function
------解决方案--------------------
换个电脑试试,很可能本机问题。
------解决方案--------------------
应该是你一次性请求数太多,就好像采集一样,一次采集太多就会超时。