views:

39

answers:

0

I looking for a simple way to wire the homepage of my website so that it fires off a Push notification message to my iPhone every time someone lands on the page (just visiting in their browser). I'm aware this could become annoying!

I currently send regular notifications to my iPhone using cron and curl to check sites / RSS feeds for change and then fire to to the Prowl API who in turn send it to my iPhone - like so:

curl https://prowl.weks.net/publicapi/add -F apikey=$apikey -F priority=$priority -F application="$app" -F event="$eventname" -F description="$description"

Could I do something similar from with the HTML of the homepage - call a script on my server which in turn fires a similar curl request above? Maybe with Javascript or PHP? Ideally I'd like the loading and rendering of me webpage to be uninterrupted by the call.

Hat tip to Prowl - http://prowl.weks.net/api.php and to flx.me Both of which I use to make what I have already working.