I have a .bat file that I run every night to "hit" a webpage. The batch file has one argument, the URL
webrun.vbs http://www....
Here is the webrun.vbs script below. Anyway, I'm running this script on two servers. One has DNS set up and is accessed like http://www.domainname.com
The other server doesn't have DNS set up yet and is accessed by ip like http://209.xxx.xxx
When I access the page by IP nothing happens. I have no idea why it won't work here. Any help
dim URL, oArgs
Set oArgs = WScript.Arguments
if oArgs.Count = 0 then
msgbox("Error: Must supply URL")
wscript.quit 1
end if
URL = oArgs(0)
on error resume next
Set objXML = CreateObject("MSXML2.ServerXMLHTTP")
if err then
msgbox("Error: " & err.description)
wscript.quit 1
end if
' Call the remote machine the request
objXML.open "GET", URL, False
objXML.send()
' return the response
'msgbox objXML.responSetext
' clean up
Set objXML = Nothing