IP address country lookup services [closed]
-
14-07-2021 - |
Вопрос
I have used ipinfodb.com for geolocation in the past, but they have a limit of 2 queries per second and the application I am working on will exceed that limit.
I need an alternative for geolocation that is fast and accurate to the country level. I am open to either a database or a web service and I am willing to pay for it.
A web service seems like it's easiest to integrate, but downloading a database is most likely faster. My concern with downloading a database is it becoming inaccurate over time if it isn't updated regularly. Is this a valid concern?
I've heard mixed reviews about Quova.
Anyone have experience with other geolocation services besides ipinfodb?
Решение
http://uppit.com/4hyisuepbh60/geoip.sql
There's a DB. DB is taken from: http://code.google.com/p/ci-geoip/ just added country_name column
$query = query('SELECT country_code, country_name FROM geoip WHERE ' . ip2long($_SERVER['REMOTE_ADDR']) . ' BETWEEN ipnum_start AND ipnum_end');