Created
April 8, 2017 13:46
-
-
Save eboominathan/bce8be1e211c3db6b4cc1749caa3d6bb to your computer and use it in GitHub Desktop.
Get the location details by using latitude and longitude
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$lattitude = 11.016844; | |
$longitude = 76.955832; | |
$geocode=file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng='.$lattitude.','.$longitude.'&sensor=false'); | |
$output= json_decode($geocode); | |
echo $output->results[0]->formatted_address; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment