function PF_gmshc_point($address){ $csv_url = "http://maps.google.com/maps/api/geocode/json?address=".urlencode($address)."&sensor=false®ion=$$region"; /// PF_print($csv_url); $ch = curl_init($csv_url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $get_contents = curl_exec($ch); curl_close($ch); //echo $get_contents; $json_output = json_decode($get_contents); //PF_print($json_output); $lat=$json_output->{'results'}[0]->{'geometry'}->{'location'}->{'lat'}; $lng=$json_output->{'results'}[0]->{'geometry'}->{'location'}->{'lng'}; // PF_print($lat); return $lat.",".$lng; }