I have used WinHttp.WinHttpRequest (as show in this post) but the problem is it does the redirects and gives me the final status (of 200) when I am more interested in the 301 or 301 redirect from the original URL.
Printable View
I have used WinHttp.WinHttpRequest (as show in this post) but the problem is it does the redirects and gives me the final status (of 200) when I am more interested in the 301 or 301 redirect from the original URL.
allow me to answer my own post:
I just had to turn off the enable redirects and ... success!
Code:Dim WebLink As WinHttp.WinHttpRequest
Set WebLink = New WinHttp.WinHttpRequest
WebLink.Option(WinHttpRequestOption_EnableRedirects) = False
WebLink.Open "GET", "http://www.cnet.com/news"
WebLink.Send
MsgBox WebLink.Status
Try using Winsock. Connect to the server, send the HTTP headers, and wait for the response.
See if this thread helps you:
http://www.vbforums.com/showthread.p...winsock+DLFile