Website monitoring

fixx

Well-Known Member
Joined
Feb 13, 2006
Messages
278
Hey guys

I am in the process of writing a small web app in PHP that would 'ping' some of the sites that we host. I would like to know (according to your expert opinion) what would be the best approach?

Up until now I was thinking of fetching the index page of each site and matching the title tag with a predefined string and if it doesn't match I will know the site has a problem.

What do you think will be the best way to approach this?

Thanks in advance.
 

WAslayer

Executive Member
Joined
May 13, 2011
Messages
8,937
exactly as you were saying.. that would be the best approach..

but will you be adding additional logic in there..? example, your index page is not being retrieved, why is it not being retrieved..? is the server down..? is there a network issue between your ping server and the web server..? point being, add as much logic to your code, that allows you to instantly see why your website is not loading..
 

halfmoonforever

Expert Member
Joined
Feb 1, 2016
Messages
1,196
Just check the header response (or do what you suggested). anything that is not 200 OK gets reported.
 
Top