구글지도 API를 이용한 좌표값 -> 주소문자열 가져오기
마스터욱
0
18
0
0
2020-03-26 15:47:25
public function get_address($post)
{
$url = "https://maps.google.co.kr/maps/api/geocode/xml?latlng=".$post['y_pos'].",".$post['x_pos']."&sensor=false&key=".$this->google_geocode_key;
$data = get_data($url);
$data = explode("</formatted_address>", $data);
$data = explode("<formatted_address>", $data[0]);
//echo $data[1];exit;
echo $data[1];
exit;
}