2015. 9. 10. 10:41
[Ubuntu]
o 샘플코드
<?php
$ip=$_SERVER['REMOTE_ADDR'];
echo $ip;
$country = geoip_country_code_by_name($ip);
if ($country) {
echo 'This host is located in: ' . $country;
}
o geoip_country_code_by_name 없다고 함.
o getip php 설치하기 (ubuntu )
# apt-get install php5-geoip
# service apache2 reload
'Ubuntu' 카테고리의 다른 글
LVM (0) | 2022.05.28 |
---|---|
dkms module fail status remove build install (0) | 2017.09.15 |
IPTIME A2000UA Ubuntu 16.04 Linux dkms (0) | 2017.08.04 |
freetds : SQLSTATE[01002] Adaptive Server connection failed (severity 9) (0) | 2017.08.03 |
ubuntu 14.04 apt-get kernel upgrade (0) | 2015.09.07 |