Sample callback script to capture motion triggers for the iPhone app Pocket Sentry
<?php
$device_id = $_POST["udid"];
$lat = $_POST["lat"];
$lng = $_POST["lng"];
if(array_key_exists("photo", $_FILES)) {
$file = $_FILES["photo"];
if($file["error"] == 0) {
$size = $file["size"]; // Bytes
$type = $file["type"]; // image/jpeg
move_uploaded_file($file["tmp_name"], "/path/to/new/location");
} else {
// There was an error
}
}
?>