Dutton

Personal Route Logging with MobileMe's Find My iPhone

Although I'm struggling to achieve a happy co-existence between Google's Calendars and Contacts and my MobileMe subscription (still fighting dupes and funny syncs with the wrong numbers being associated with the wrong contacts etc... but that's for another blog post!), one part of MobileMe I was keen to do something with was their "Locate My iPhone" feature. Regular apps aren't allowed to run in the background on the iPhone, making any form of auto-updating tracking application all a bit "manual"  (e.g. Google Latitude on the iPhone), Apple have provided the ability to get the location of your iPhone automatically, but as it's officially being touted as a feature to use when you've lost your iPhone it's tucked away within the "Account Settings" section of the MobileMe web page.

This was screaming out to be screen-scraped and developer Tyler Hall has stepped up to the plate with Sosumi - A MobileMe Scraper. Using Sosumi is literally a case of including the class in your PHP, instantiating it with your MobileMe username and password and calling its locate method which returns an object containing the current latitude, longitude and result accuracy, it's as simple as that!

At the moment I've got a cron job on my server hitting this every five minutes and logging to a database. If the data hasn't changed since the last logged entry, a counter is incremented and timestamp_last is set. A very simple Google Map displays these locations as points on a map but I've got loads of ideas of stuff to play about with, such as:

Bit sad I know, but it seemed too good for a total sync-monkey like myself and I'll never pass up an opportunity, however contrived, for a PHP mash-up!


Share this: