PHP Classes


Recommend this page to a friend!
  Classes of . Karatag   Karatag Google Maps HTTP Request   Download  
Role: Example script
Content type: text/plain
Description: Example File to get coordinates from Google Maps
Class: Karatag Google Maps HTTP Request
Get coordinates of an address using Google Maps
Author: By
Last change:
Date: 17 years ago
Size: 751 bytes


Class file image Download
// Include the GoogleMapsHTTPRequest class

$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:
$GoogleMapsApiKey = 'YOUR-API-KEY';

$ga = new googleRequest($address, $city, $country, $zip);



// You can use the result to place your Mark in the Map
echo '<br />LATITUDE: '.$ga->getVar('latitude');
'<br />LONGITUDE: '.$ga->getVar('longitude');