I'm using this script to get the geo-code information from Google but I don't know how to filter out just specifics such as Lat, Lon, Town, County. Here is my code (which I beleive will work under the new API-3?):
<?php
$address="LS1 7AS";
$result=file_get_contents("http://maps.google.com/maps/api/geocode/json?address=" . urlencode($address) . "&sensor=false" );
$geocodedinfo=json_decode($result);
print_r($geocodedinfo);
?>
This prints out all of the information I need but as a block, I just want to have some of them so I can insert it into a table, for example:
$town = "town from result";
$county = "county from result";
$lat = "lat from result";
$lon = "lon from result";