I found the bit of code below and have altered it for my use, the only problem is that if the website does not give a failed return or success the code never ends. (IE if the site is hanging)
is there any way to set a time out after the "HttpRequest.send" command. so if after 30 seconds there is no response it marks it as failed and moves on?
Set HttpRequest = CreateObject("Msxml2.XMLHTTP")
HttpRequest.open "HEAD", "http://example.com/", False
On Error Resume Next
HttpRequest.send
If Err.Number <> 0 Then
WScript.Echo "Error : " & Err.Number & ": " & Err.Description
Else
WScript.Echo "HTTP status: " & HttpRequest.status & " " _
& HttpRequest.statusText
End If
cheers
OH this is VBA
Aaron