I have a lat and long and would like to send these via a http request to something like google maps and retrieve a postcode for the UK.
Is this possible?
I have a lat and long and would like to send these via a http request to something like google maps and retrieve a postcode for the UK.
Is this possible?
$json = file_get_contents("http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=manchester+uk");
$json = json_decode($json);
$json is an array; therefore, you can access any data from http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=manchester+uk
If you need to lookup the lat and lng, you can replace the urls with this: http://maps.googleapis.com/maps/api/geocode/json?latlng=53.39990299999999,-2.30009690&sensor=false