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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

site availability checker?

Status
Not open for further replies.

nell1

Technical User
Jan 8, 2003
142
0
0
GB
I want to create an asp application that checks our site for availiability on certain time intervals.

I'm thinking that the best way would be to request a page from the site to check if its available. Is it possible to request a page from asp and decipher the headers that come back for any error codes and then carry out any further actions like emailing.

Cheers!

Neil
 
You can use XMLHTTP object to navigate to a page and then check the response.
Not shure if the naming of object is right, i have windows 2003 and it's diferent from Windows 2000.
It's not hard to search here for the right object name

set xml= Server.CreateObject("XMLHTTP")
xml.Open "GET", " False
xml.send
response_text = xml.responseText


________
George, M
 
Thanks for the reply shaddow,

hadn't though about the xmlhttp object..perfect!

Thanks alot for your help!


Nell1
 
An easier way then checking the response text would be to check the status property. Basically as long as you get a status of 200 then your good to go, the rest (404, etc) would obviously be bad states.

-Tarwn

[sub]01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111[/sub]
The never-completed website:
 
works a treat Tarwn...

Many thanks for your input!

Nell1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top