BLOG main image
분류 전체보기 (65)
Ubuntu (6)
Laravel (2)
VMware (2)
Unix (2)
OpenSuse (2)
수영 (51)
Visitors up to today!
Today hit, Yesterday hit
daisy rss
tistory 티스토리 가입하기!
2015. 9. 10. 10:41

o 샘플코드

<?php

$ip=$_SERVER['REMOTE_ADDR'];

echo $ip;

$country = geoip_country_code_by_name($ip);

if ($country) {

    echo 'This host is located in: ' . $country;

}


geoip_country_code_by_name 없다고 함.


o getip php 설치하기 (ubuntu )

# apt-get install php5-geoip


# service apache2 reload