This function will retrieve the latitude and longitude of an address by geocoding it using the Google Maps API. Google's documentation can be found at:

Retrieves the latitude and longitude of your $address. If you supply a $key then you will be limited to 15,000 geolocation requests per day. When your $status becomes 'OVER_QUERY_LIMIT' then stop! I don't recommend getting on Google's bad side. If you don't supply a $key then you will be limited to 2,500 geolocation requests per day.

$address The address you want to geocode.
$key Your Google Maps API Key (if you want to use the deprecated V2).
Returns An array($status, $latitude, $longitude) of your geocoded address.
Example
list($status, $latitude, $longitude) = geocode ('Eiffel Tower');
Download