Commit e7c4cdd5 by Jansa Jose

latlng

parent 28270e66
...@@ -3362,6 +3362,18 @@ print_r(date('H:i',$ms));exit();*/ ...@@ -3362,6 +3362,18 @@ print_r(date('H:i',$ms));exit();*/
$data['specialization'] = $data['specialization_id']; $data['specialization'] = $data['specialization_id'];
$data['gender'] = strtoupper($data['gender']); $data['gender'] = strtoupper($data['gender']);
$ch = curl_init();
$area = $data['zip_code'];
$url = "https://maps.googleapis.com/maps/api/geocode/json?address=${area}&key=AIzaSyDMcP8sMKFPmLROvIf3g1U86_Vg5ur41nQ";
//print_r($url);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
$json = json_decode($result, TRUE);
$data['default_latitude'] = $json['results'][0]['geometry']['location']['lat'];
$data['default_longitude'] = $json['results'][0]['geometry']['location']['lng'];
unset($data['zip_code']); unset($data['zip_code']);
unset($data['landmark']); unset($data['landmark']);
unset($data['biodata']); unset($data['biodata']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment