PHP Website Monitoring and DNN Keep Alive Script
February 11th, 2009I discovered this looking for an easy way to keep DNN alive on a low volume site. Since Dot Net Nuke (DNN) uses ASP, if no one visits the site for 30 minutes it will unload and take an ungodly amount of time to load for the next visitor. One more reason to avoid it…
Here’s a handy script (called “sPing”) to monitor any number of sites and ensure that they return a pleasant status code (200 or 304). The script will silently access each of the URLs in the array. Any that return something nasty like a 403, 404, 500, or 503 will be output to the console along with the particular status code.
http://jamescoletti.com/php-website-monitoring-script
Since my hosting arrangement sends me a notification every time a cron job executes, I entered a non-existent address (for cron notification) to avoid getting notifications every 15 minutes and then added my own SMTP mailer logic to send me a notice if any of the sites are down.