Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IPok_Web
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IPok
IPok_Web
Commits
e7c4cdd5
Commit
e7c4cdd5
authored
Aug 01, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latlng
parent
28270e66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
Webservice.php
admin/application/controllers/Webservice.php
+12
-0
No files found.
admin/application/controllers/Webservice.php
View file @
e7c4cdd5
...
@@ -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'
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment