Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-type: text/xml');
- header('Pragma: public');
- header('Cache-control: private');
- include("koneksi.php");
- echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
- echo "<markers>";
- $sql="SELECT * FROM `gps` WHERE `datetime` >= NOW() - INTERVAL 1 DAY";
- $query=mysql_query($sql) or die(mysql_error());
- while ($data=mysql_fetch_array($query)) {
- echo "<marker identity='".$data['identity']."' mac='".$data['mac']."' latitude='".$data['latitude']."' longitude='".$data['longitude']."' lat='".$data['lat']."' lng='".$data['lng']."' date='".$data['date']."' dbm='".$data['dbm']."' technology='".$data['technology']."' speed='".$data['speed']."' altitude='".$data['altitude']."' satellites='".$data['satellites']."'/>";
- }
- echo "</markers>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement