Find below example using php
<?php
$address ="1600+Amphitheatre+Parkway,+Mountain+View,+CA";
$url ="http://maps.googleapis.com/maps/api/geocode/xml?address=".$address."&sensor=false";
$getAddress = simplexml_load_file($url);
print"<pre>";
print_r($getAddress);
?>
It return all detail you need to get latitude/longitude as below.
<?php
print"<pre>";
print_r((string)$getAddress->result->geometry->location->lat); echo "<br />";
print_r((string)$getAddress->result->geometry->location->lng);
?>
For more detail please click on below link:
http://code.google.com/apis/maps/documentation/geocoding/