Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monitor for a web site 1

Status
Not open for further replies.

lytus

MIS
Jun 17, 2004
48
US
Hey all,
I was just wondering if anyone had or knew how to monitor the availability of a web site using vbscript.
Any help would be greatly appreciated.
 
Using godaddy.com you can purchase a monitoring option that will try its best to secure the domain name when the monitor sees its available. I know you may be trying to save cash, but .. i tried :)

::.I may not know it all, but I still approach it with confidence to figure it out::.
 
So are you saying that there is no way to do it? All I would really like to do is be able to go out to a site, read a piece of text from it that we set, so I know it is always there, and this would verify it is available. I guess I just need to know how to open a web site or read from a web site or something.
 
Hello lytus,

Use msxmlhttp component to get the page from the site. Parse the responsetext for the signature to ascertain "availability".

Look for samples tek-tips or google. You can for instance take a look of thread I'd participated:

regards - tsuji
 
That is exactly what I was looking for, thank you very much.
 
Here is the script I use... Very simple

'#
'# AUTHOR: Simon Dunford, January 2004

const WEBPAGE = "
dim oXMLHTTP, xml, sStatus

'# Create an xmlhttp object:
set xml = createObject("Microsoft.XMLHTTP")

' Or, for version 3.0 of XMLHTTP, use:
' Set xml = CreateObject("MSXML2.ServerXMLHTTP")

'# Opens the connection to the remote server and Send
xml.Open "GET", WEBPAGE, False
xml.Send

'# Get status
sStatus = xml.status

if cInt(sStatus) <> 200 then
msgbox "Error " & sStatus & " reported from website."
sSubject = replace( SUBJECT, "%e", sStatus )
sBody = replace( BODY , "%e", sStatus )
else
msgbox sStatus
end if

'# Output entire results to test it got the page!!!
msgbox xml.responseText

Set xml = Nothing

msgbox "Done"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top