Forum Moderators: open
I want users to be able visit an asp page on one site to test whether another site is having downtime. The other site will also have asp
dotme//
Thanks for the recommendation. I'll consider downloading it, but I wish user's to be able access this information in their browser.
question?//
Is it possible to use Scripting.FileSystemObject to display a certain message if a page is say from 4-5 kb and display a message if it is or if it isn't?
cmatcme
If you don't get a 200, then throw an error.
Set objXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.Open "GET", "http://www.example.com", false
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXMLHTTP.send()
If objXMLHTTP.status <> "200" Then
' throw error
End If
Set objXMLHTTP = Nothing
I like matts 200 check script too, you could easily que that hugger up on another server and let it run 'all the time' then build in a paging mechanism whenever it's not 200.
if you get a "Page Cannot be Displayed" then you know the server is down.
Could those types of errors also be caused by a local DNS problem?
I suppose you could build an app/script called by CRON every few seconds that requests a page from the webserver localhost, and fires you off an email/SMS in the event of a problem.
At least that way you rule out any networking issues between you and the server potentially triggering a false alarm.
I'd be surprised if there are not scripts around that do something like that?
TJ