Hi have a code which check the http status of the URL but the problem is that I have around 25000 URL's for which I need to check http staus & this code always keeps givin me runtime error "Operation time out"(screen shot attached). please help me with as i can't leave my system unattained following is the code:
Sub Get_Http_Request_Status()
Dim HttpRequest As WinHttpRequest
Dim lastRowColumnE As Long, row As Long
Set HttpRequest = New WinHttpRequest
' Set objWinHttpRequest = Server.CreateObject("WinHttp.WinHttpRequest.5")
' var WinHttpRequest = new ActiveXObject("WinHttp.WinHttpRequest.5.1")
' WinHttpRequest.SetTimeouts 30000, 30000, 90000, 90000
' objWinHttpRequest.SetTimeouts 30000, 30000, 70000, 70000
' Return Value = WaitForResponse( Timeout = -1)
With Worksheets("URL_Status_Check")
lastRowColumnE = .Cells(.Rows.Count, "E").End(xlUp).row
If lastRowColumnE = 1 And .Cells(lastRowColumnE, "E").Value = "" Then lastRowColumnE = 0
For row = 2 To lastRowColumnE
If .Cells(row, "E").Value <> "" Then
HttpRequest.Open "GET", .Cells(row, "E").Value, False
HttpRequest.Send
'Put status code and text in adjacent columns
.Cells(row, "J").Value = HttpRequest.Status
.Cells(row, "K").Value = HttpRequest.StatusText
End If
Next
MsgBox "All URL's Checked"
End With
Set HttpRequest = Nothing
End Sub
also is there any way that it can track the redirected url & page title of each url n store it in adjacent column.
thanks in advance!!
Bookmarks