An online icon (online.png) on the remote server you want to see the status of.

An offline icon (offline.png) on the server that is going to show the status page.

If the image on the remote server fails to load, the onerror event is triggered and the javascript rewrites the image tag to show the offline image. You can use relative or absolute paths for the offline image. This snippet is fully compatible with all major browsers, including Internet Explorer down to version 5.5!

Posting code in comments isn’t easy on WordPress.com – Pastebin is a good resource for this.

There are’s some basic problems with your suggestion:

First – the snippet is PHP, a server-based technology which has prequisites on the hosting environment.

Second – it doesn’t actually register anything, as you provide no code for it, just a shell for serving up an image via PHP.

Third – You can get this information from your web server logs without any additional code, should you need it. Generally though, you’re not interested in how many people couldn’t access your site, but rather how long it has been down.

First – Yes, it would indeed require prequisites. I can’t come to think of a way that would not need prequisites.

Second – I left that blank so that the implementer could specify their prefered way of registering it. Just plain text output to a local file, database insertation or E-mail to name a few of the alternatives.

Third – How would you achieve to see when a remote server is down through local serverlogs? If you mean by checking the amount of offline.png requests there are that is true. Although since you brought up prequisites the website has to be set up to monitor that. A common tendency on default setups is to remove old logs.

I do agree that the frequency and duration of actual downtime is more interesting than the amount of users that could not access a resource – hence my outbreak!

What’s Going down i’m new to this, I stumbled upon this I’ve found It absolutely useful
and it has helped me out loads. I’m hoping to contribute & assist different customers like its helped me.
Good job.