105 |
106 |
Lastcheck: get('lastcheck')); ?> — NextCheck: get('lastcheck')); ?> Sekunden
107 |
108 |
109 |
110 |
111 |
112 |
276 |
277 |
278 |
--------------------------------------------------------------------------------
/location.json.php:
--------------------------------------------------------------------------------
1 | './', 'gzip' => false);
18 | $db['settings'] = Flintstone::load('db_settings', $options);
19 | $db['locations'] = Flintstone::load('db_locations', $options);
20 |
21 | function getCoordinates($deviceID = false) {
22 | global $db;
23 | $keys = $db['locations']->getKeys();
24 |
25 | foreach ($keys as $location) {
26 | $entry = $db['locations']->get($location);
27 | if(!$deviceID || $entry['deviceID'] == $deviceID) {
28 | $result[] = $entry;
29 | }
30 | }
31 | return $result;
32 | }
33 | $locations = getCoordinates();
34 |
35 | foreach ($locations as $entry) {
36 | $l[] = $entry;
37 | }
38 |
39 | echo json_encode($l);
40 |
41 | // CACHING
42 | file_put_contents($cache_filename, ob_get_contents());
43 | ob_end_flush();
44 | // CACHING
45 | ?>
--------------------------------------------------------------------------------
/track.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sinky/php-location-tracking-icloud/1e241c922aea3b65f969e793bdcdb95b888a0957/track.php
--------------------------------------------------------------------------------