<?php
// Include the GoogleMapsHTTPRequest class
include_once('./GoogleMapsHTTPRequest.class.php');
$address = 'In der Mark 57'; // Street
$city = 'Bochum'; // City
$country = 'Germany'; // Country
$zip = '44869'; // Zip-Code, PLZ
/**
* Paut your Google Maps Api Key Here!
* If You don't have a Key yet? You can get it here: http://www.google.com/apis/maps/signup.html
*/
$GoogleMapsApiKey = 'YOUR-API-KEY';
$ga = new googleRequest($address, $city, $country, $zip);
$ga->setGoogleKey($GoogleMapsApiKey);
$ga->GetRequest();
// You can use the result to place your Mark in the Map
echo '<br />LATITUDE: '.$ga->getVar('latitude');
echo '<br />LONGITUDE: '.$ga->getVar('longitude');
?>
|