Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. $geocode = file_get_contents('https://maps.google.com/maps/api/geocode/json?key=AIzaSyC2QUiue7-QhtLVQlPyW9rvpRg2dWhQgi0&address=' . $address . '&sensor=false');
  2.  
  3.         $output = json_decode($geocode);
  4.  
  5.         $latitude = $output->results[0]->geometry->location->lat;
  6.         $longitude = $output->results[0]->geometry->location->lng;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement