Skip to content

Locate #12

Description

@NathanWilcox

Hi,

Where in the following code can I enter specific device id to return the location?

// This will print out all the devices on your account so you can grab the device IDs
	//$fmi->printDevices();

	// Find a device that is reporting its location and attempt to get its current location
	foreach ($fmi->devices as $device) {
		if ($device->location->timestamp != "") {
			// Locate the device
			$location = $fmi->locate($device->ID);

			print "Device <B>".$device->ID."</B> is located at <I>".$location->latitude.", ".$location->longitude."</I>";

			// Play a sound on the device
			//$fmi->playSound($device->ID, "You've been located!");

			// Lock the device
			//$fmi->lostMode($device->ID, "You got locked out", "555-555-5555");

			break;
		}
	}
?>

I would like to only request location of a specific device not all of them.

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions