Last active
April 13, 2018 17:01
-
-
Save bondarewicz/7101128 to your computer and use it in GitHub Desktop.
PHP: Google GeoCoding Example
This file contains hidden or 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 | |
$input = "1600 Amphitheatre Parkway, Mountain View, CA"; | |
$request = array(); | |
$request['url'] = "http://maps.googleapis.com/maps/api/geocode/json?address="; | |
$request['address'] = urlencode($input); | |
$request['sensor'] = "&sensor=true"; | |
print "<pre>"; print @file_get_contents(join('',$request)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Short and Sweet, works beautifully. Thank you.