Pages

Tuesday, September 6, 2011

vb script to execute the given URL and read the html code

The following script executes the give URL and returns the html code of it.

dim xmlhttp, url
url = "http://www.google.com"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
WScript.Echo xmlhttp.responseText
set xmlhttp = nothing


now store this as .vbs and execute

No comments:

Post a Comment