Try using the following code

<?php

$address = "1600 Amphitheatre Parkway Mountain View CA";

define("MAPS_HOST", "maps.google.com");

$base_url = "http://"; . MAPS_HOST . "/maps/api/geocode/xml";
$request_url = $base_url . "?address=" .
urlencode($address) ."&sensor=false";

$xml = new SimpleXMLElement(file_get_contents($request_url));

echo "<br>-->".$xml->status;
echo "<br>-->".$xml->result->geometry->location->lat;
echo "<br>-->".$xml->result->geometry->location->lng;

?>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to