This entry has been published on 2013-02-26 and may be out of date.
Last Updated on 2013-02-26.
<? $address = utf8_encode('1030 wien'); //Use this function to avoid problems with special characters, like German 'Umlaute' $response = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($address) . '&sensor=true'); $response = json_decode($response); echo 'Latitude:' . $response->results[0]->geometry->location->lat; echo 'Longitude:' . $response->results[0]->geometry->location->lng; ?>