<?


function getLatLng($address)
    {

        $json    = json_decode(file_get_contents("http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false"));

        $lat     = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};
        $lng    = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};

        return array("lat" => $lat, "lng" => $lng);

    }