LINUX.ORG.RU

Ответ на: комментарий от gudik

$ yum search geoip
lighttpd-mod_geoip.i386 : GeoIP module for lighttpd to use for location lookups
GeoIP.i386 : C library for country/city/organization to IP address or hostname mapping
python-GeoIP.i386 : Python bindings for the GeoIP geographical lookup libraries
mod_geoip.i386 : GeoIP module for the Apache HTTP Server
GeoIP-devel.i386 : Development headers and libraries for GeoIP
perl-Geo-IP.i386 : Efficient Perl bindings for the GeoIP location database

+ http://www.maxmind.com/app/linux
+ порыться в гугле и найти что-нибудь еще

dGhost ★★★
()
Ответ на: комментарий от gudik

>а опен сорсных библиотечек никто не знает ?

emerge geoip

...

        include_once('geoip/geoip.inc');
        include_once('geoip/geoipcity.inc');

        $gi = geoip_open(config('geoip_dir').'/geoip/GeoIPCity.dat', GEOIP_STANDARD);

        $record = geoip_record_by_addr($gi, $ip);
        $cc = $record->country_code;
        $cn = $record->country_name;
        $cin = $record->city;
        geoip_close($gi);

...

KRoN73 ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.