I use the following function to check if a URL responds in a few seconds:
function testUrl(url)
Set xmlDOM = CreateObject("MSXML2.ServerXMLHTTP.6.0")
xmlDOM.Open "GET", url, False
xmlDOM.setTimeouts 1000,1000,1000,1000
testUrl=xmlDOM.Send
end function
if testUrl("http://khabarfoori.com/rss/mm") then
responsw.write "active"
else
response.write "inactive"
end if
Instead of getting "active" or "inactive" I get the following error:
> msxml6.dll error '80072ee2'
> The operation timed out
Footnote: The tested URL above buffers a big amount of text with no server error. Is it a special case and I need more code to handle this kind of response?
question from:
https://stackoverflow.com/questions/65869073/how-to-use-msxml2-settimeouts-to-prevent-timeout-error 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…