vb MSXML2.XMLHTTP 未响应 10
PublicFunctiongetHTTPPage(url,u)DimhttpSethttp=CreateObject("MSXML2.XMLHTTP")http.Ope...
Public Function getHTTPPage(url, u)
Dim http
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "post", url, False
http.send (u)
If http.ReadyState <> 4 Then
Exit Function
End If
getHTTPPage = BytesToBstr(http.responseBody, "UTF-8")
Set http = Nothing
Exit Function
End Function
Public Function BytesToBstr(body, Cset)
Dim objStream
Set objStream = 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
我用上面MSXML2.XMLHTTP post 向网站提交内容 ; 如网速慢 或网站卡的时候 就出现 程序响应慢的问题 请问有好的解决方法吗?
DoEvents 我用这个也没能解决这个问题
分不多,请各位高手 帮帮忙 展开
Dim http
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "post", url, False
http.send (u)
If http.ReadyState <> 4 Then
Exit Function
End If
getHTTPPage = BytesToBstr(http.responseBody, "UTF-8")
Set http = Nothing
Exit Function
End Function
Public Function BytesToBstr(body, Cset)
Dim objStream
Set objStream = 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
我用上面MSXML2.XMLHTTP post 向网站提交内容 ; 如网速慢 或网站卡的时候 就出现 程序响应慢的问题 请问有好的解决方法吗?
DoEvents 我用这个也没能解决这个问题
分不多,请各位高手 帮帮忙 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询