Be the first to write a review
A Site Monitoring Widget with jQuery and cURL
Build a cool site-monitoring widget that allows you to monitor the status of multiple sites
In this tutorial we’ll look at how to build a cool site-monitoring widget that allows you to monitor the status of multiple sites. If you maintain a large number of web sites checking that each one individually is up and running could be a time-consuming chore, but with this widget we can instantly see if any sites are down.
We’ll use jQuery to build the interface and communicate with the server and we’ll use PHP and the cURL extension to actually check each site is up and running by making a request to the specified sites and checking which response headers are returned. We’ll also be using MySQL to store the URLs of the site’s we’ll be monitoring; it’s not strictly required, there are a number of alternative storage methods we could use including a plain text file, a PHP array, a JavaScript array, etc, but MySQL is probably the most robust method and it means we can easily add new sites to monitor.
Dan Wellman
Dan Wellman is an author and web developer based in the UK. Dan has written three books so far; the latest, jQuery UI 1.7: The User Interface Library for jQuery, was released at the end of 2009.
Dan has been writing web development tutorials for over 5 years and works by day for a local digital media agency in his home town of Southampton.