$geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address=573/1,+Jangli+Maharaj+Road,+Deccan+Gymkhana,+Pune,+Maharashtra,+India&sensor=false');
$output= json_decode($geocode);
$lat = $output->results[0]->geometry->location->lat;
$long = $output->results[0]->geometry->location->lng;
The line above makes a request to Google maps API. Passes the address, and receives the response in JSON format.
The URL has following options
http://maps.google.com/maps/api/geocode/output?parameters
For more details about parameters check out the Google’s geocoding documentation.
Blogger templates
Blogger news
Blogroll
Archives
-
▼
2013
(219)
-
▼
November
(19)
- AJAX file upload
- web usabilty
- ThinkUp – Open-source app that stores your social ...
- Comments in PHP
- All About Our PHP Tutorials
- Using echo
- How to get Latitude/Longitude from an address (or ...
- modify timestamp in php
- Copyright Policy
- Adding CURL extension to PHP 5.3.5
- php home
- Teknik Debugging Script PHP + MySQL
- database related links in php
- No title
- PHP Best Practices - 3 : Use White Space and Inden...
- PHP Syntax Overview
- Why PHP?
- display cookies in php
- Want to display html string as text using php?
-
▼
November
(19)