Submit to DiggSubmit to FacebookSubmit to Google PlusSubmit to StumbleuponSubmit to Twitter

EDIT. I've made a few changes on 3 DEC 2012.

Sometimes VBscript just runs like crazy waiting for IE. even though the request has been sent fine.

I spent a few hours looking for a way to send a GET request.

There's plenty of these out there:

Set http = CreateObject("Microsoft.XmlHttp")

And stuff with msxml, msxml2, msxml.hmlhttpserver, msmxl2.xmlsmlxmslmslsmslrequestgetsmslwllxl and all the others.

Problem is what version will be on the windows machines you deploy it to? there are no less than a shitload of versions.

Between service packs, patches, and special versions you may/may not have installed....

I found this works more often than not:

Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 0
IE.navigate "" & value & "key2=" & value2
Do While IE.Busy
WScript.Sleep 200 ' see the above notice of change
Exit Do ' prevents script host from going crazy waiting for IE
HTTPGet = IE.document.documentelement.outerhtml
Set IE = Nothing

'WScript.Echo HTTPGet 'good for debugging. shows what you got back.



If this article was at least a little helpful, how about a +1?

{jcomments on}