I was asked a question last week about alternate notification methods to mobile devices (thanks Arlin!). Email is good and sms is solid, but both come with drawbacks. Emails to a mobile device generally have large polling times (iPhone has a minimum of 15mins) and sms notifications generally cost $$$ (each sms at our workplace costs 0.25c). Most of the times this is acceptable and required for robustness, but what about if the client wants prompt notifications and doesn’t want to outlay any money? Or what if you’ve got some Opto gear at home and you want to be notified of an event? Thank-you xmpp(hp)!!
Xmpp (or Jabber as it was originally called) is the protocol used by chat servers such as Google Talk and Live Journal Talk. It’s been around for yonks and a few years ago a clever bunch of guys got together and created a php class called xmpphp (http://code.google.com/xmpphp). Using this class, some (more) php, a webserver and Opto22’s new HttpPostFromStringTable command, I have knocked up a sub and a sample strategy showing how to send IM’s to your mobile device. The system relies on a web server running php and openssl but if you don’t have one, you can post to www.22solutions.com.au/opto/im.php
It would be really cool to do it directly from the controller, but all xmpp transactions are encrypted (i’m sure you could find a server that doesn’t) and i’m pretty sure you can’t pass com handle data through a tls/ssl parser on the controller (Suggestions box?).
i have attached a sample strategy (compiled in 9.1 Basic) and the required php files to get a system up and running. I reckon its pretty cool and once set up it works really well.
Be sure that the user and the recipient are ‘buddies’ or else the message won’t be delivered.
Have fun. Another entry in the ‘Awesome Things Opto22 Can Do!’ list.
*Note:if you tried to use the scripts on my site, i had an issue where the test script would not work. It’s fixed now.