Created
July 28, 2010 01:08
-
-
Save tylerhall/493145 to your computer and use it in GitHub Desktop.
Sosumi multiple devices example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
require 'class.sosumi.php'; | |
$ssm = new Sosumi('username', 'password'); | |
// Print a list of all the devices in your MobileMe account | |
print_r($ssm->devices); | |
// $device_number is an integer (0 through ...) that corresponds | |
// to the device you want info about. | |
$location_info = $ssm->locate($device_number); | |
// All of Sosumi's functions support a $device_number argument that | |
// lets you specify which device to target. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears as though with the current version of the library, you must use the device ID provided by print_r($ssm->devices); It took me a while to figure this out since $ssm->locate() does not throw an error if an invalid $device_number is provided.