Google Maps V3 Geocoding
Hi,
I got my code for GEOCODING for V2. Can someone help me to get this work in V3?
<?php
$geoAddress = ((isset($_POST["street"]))?$_POST["street"]:"").", ".
((isset($_POST["postcode"]))?$_POST["postcode"]:"").", ".
((isset($_POST["city"]))?$_POST["city"]:"").", ".
((isset($_POST["province"]))?$_POST["province"]:"").", ".
((isset($_POST["land"]))?$_POST["land"]:"");
function geoData($adresse, $key=2){
$handle = fopen("http://maps.google.de/maps/geo?q=".urlencode($adresse)."&sensor=false&oe=utf8&gl=en&output=csv&key=ABQIAAAAXCk6mF4VKYGQBKMVa-MEIN-API-KEY-Sey417lEIxReUsDLQDP9q-xfAPncQLPsApZABA",",r");
$data = fgetcsv($handle);
return $data[$key];
}
?>
<?php
echo geoData($geoAddress, 2);
echo geoData($geoAddress, 3);
?>
Thanks for help,
Denis