Jump to content

Site Uptime using PHP ?


areeb

Recommended Posts

sounds like it'd be a chron job. if you could figure out how to do a chron job to run like once every hour or whatever frequency you want, im sure it would be easy to do. on my site, i have it set up where if my mysql database is down, a special message appears. all you would really have to do is have the script try include a file with a variable like $online = "yes"; and back in the main script, if that value returned isn't "yes" (like when an error occurs), then it runs a mail function (which is easy to set up).thinking about this now, it wouldnt work anyways unless this chron job was on a different server, bc if your server went down, it wouldnt be able to run anything which means it couldnt even check and send you the email.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...