torjanX

test.php

Aug 2nd, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.51 KB | None | 0 0
  1. <?php
  2. $str = file_get_contents('http://dweet.io/get/dweets/for/ahmed_gps_gps');
  3. $json = json_decode($str, true); // decode the JSON into an associative array
  4. echo "<b>Date: </b>".$json['with'][0]['created']."<br>";
  5. echo "<b>GPS_Lat: </b>".$json['with'][0]['content']['gps_lat']."<br>";
  6. echo "<b>GPS_Long: </b>".$json['with'][0]['content']['gps_long']."<br>";
  7. echo "<b>GPS_Bearing: </b>".$json['with'][0]['content']['bearing']."<br>";
  8. echo "<b>GPS_Speed: </b>".$json['with'][0]['content']['speed']."<br>";
  9.  
  10.  
  11. ?>
Add Comment
Please, Sign In to add comment