Send Yourself iPhone Push Notifications When Your Site is Down for Free

It has been six months since Apple released push notifications however the adoption has been pretty low among website monitoring tools. Probably because creating an iPhone App is not a trivial task. This tutorial describes how to use free tools available (mainly JotForm iPhone App) to send your iPhone push notifications when there is a problem on your site.

This is a completely free solution for low budget webmasters. If you have a budget, consider getting a Pingdom or WasMySitesUp accounts. Both started offering iPhone app solutions for their paid Premium users recently.

Our solution basically consists of two parts. First we setup a JotForm form so that we can trigger iPhone push notifications using the free JotForm iPhone app. On the second part, we will setup a PHP script that runs periodically and check if your site is up or down. If your site is down, it will send an email and it will also make a submission on JotForm which should also trigger an iPhone push notification. Enjoy the tutorial!

Step 1: Create a JotForm Account
Complete this short sign up form to create a free JotForm account. JotForm is completely free upto 100 submissions per month. Hopefully, your site shouldn’t go down that much so it is essentially free service for this case.  :)

Step 2: Create a Form
Log into your JotForm account and create an empty form. Click on “Form Properties” button at the top and rename your form title to “Site Down” on the right side. If you will check multiple sites, you can also include your site name here as well.

title_change2

That’s pretty much all you need to do on the form builder. Save your form and click on the “Source” button to get the form ID for this form.

get_form_id2

Step 3: Install JotForm iPhone App and Accept Push Notifications

On your iPhone, launch “App Store” application and search for “JotForm” application. Install it and when you run it for the first time, you will be asked for your JotForm username and password. Enter them. Then you will be asked if you accept to receive Push Notifications from this application. Click on “OK” to accept it.

Step 4: Setup Monitoring Script

Let’s now  setup our monitoring script. If you have multiple sites, setup this script on your other server so that it will still work even if the whole server is unavailable. Download this file, open in a text editor and change variables at the top. Save and upload it to your web site.

Go to the script on your browser and check if it works. It should say “OK” if your site is down and should send an email and push notification to your iPhone if the site is not working.

Step 5: Setup a Cron Job

Once our script is working, create a cron job so that your site can be checked periodically. If you are running on a Cpanel based hosting, you can find out how to setup cron jobs here.

The command you run on the cron job should be as following:
/usr/bin/wget -q -O /dev/null “http://domain.com/monitor.php

Step 6: Test it

One way to test it would be to temporary remove the checked word  from the web page. You should receive an email and a push notification within the time period on your cron jobs.

It is very important to get notified about problems on your site. Getting them on your iPhone for free is also pretty nice. I hope you will find this tutoria useful. If you have any questions or problems, feel free to post on the comments.

Leave a Reply

Security Code: