PHind my Phone

If you’ve ever left your iPhone in a cab, you know what a life saver iCloud and Find My iPhone are. You can instantly check up on all your iDevices and find out where they are or remote lock them.

But, what if you wanted to do it programmatically or outside of Apple’s official app? You totally can! Download Neal’s (no relation) FindMyiPhone library, and you can access all the features (message, locate, wipe, lock, alarm, etc.) in PHP.

Here’s an example that sends my laptop a little love note:

FindMyiPhone demo

```php <?php require dir . ‘FindMyiPhone.php’;

try { $FindMyiPhone = new FindMyiPhone(‘ICLOUD_ID’, ‘ICLOUD_PASS’);

// get the device id for first device found $device_id = $FindMyiPhone->devices[0]->id;

echo ‘Sending notification… ‘; echo ($FindMyiPhone->send_message($device_id, ‘Hi Neal 👻’, false, ‘FindMyiPhone’)->statusCo$ echo PHP_EOL;

} catch (exception $e) { echo ‘ERROR: ‘ . $e->getMessage() . PHP_EOL; } ?> ```

You can change the alert title, text, and more to create your own custom alerts and messages. But be careful, because once you’re authenticated, FindMyiPhone won’t hesitate to let you wipe or lock your phone.

Comments :)
2017 Neal Shyam