/ Published in: PHP
URL: http://amiworks.co.in/talk/how-to-get-latitudelongitude-from-an-address-or-geocoding-using-php/
Convert an address to geocode Latitude/Longitude positioning with PHP and Google Maps
Expand |
Embed | Plain Text
<?php $address = '201 S. Division St., Ann Arbor, MI 48104'; // Google HQ $geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$prepAddr.'&sensor=false'); $output= json_decode($geocode); $lat = $output->results[0]->geometry->location->lat; $long = $output->results[0]->geometry->location->lng; ?>
You need to login to post a comment.
