Created
April 23, 2013 09:19
-
-
Save sangar82/5442092 to your computer and use it in GitHub Desktop.
Get lat,lng from googleapis from PHP
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
$direccion = "put here the adress"; | |
$resultado = json_decode(file_get_contents("http://maps.googleapis.com/maps/api/geocode/json?address=".urlencode($direccion)."&sensor=false")); | |
echo $resultado->results["0"]->geometry->location->lat; | |
echo $resultado->results["0"]->geometry->location->lng; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notice there may be more than one result (or none at all).