Base GeoIP - countries and cities, June 2011 (+ update script)
An updated version of the Russian-language database of countries and cities has been released. Major changes:
- due to the new base ipgeobase.ru, the accuracy of determining the cities of Ukraine has improved
- cities have disappeared from the free version of the geobaza.ru database, therefore, the accuracy of determining the cities of other CIS countries has decreased
- added a script with which you can independently update the database (without adding new cities and countries)
- the net_ru_2 and net_su tables have been removed from the database, the sample queries have been changed
The result of this work is available for free download.
The database is distributed in two versions: “ Countries and cities ” (21Mb, after installing ~ 122Mb) and “ Countries only ” 2Mb, after installing ~ 13Mb). Also in the archives is a small example of using the database in php.
The accuracy of determining the country ~ 99%, the accuracy of determining the cities on average ~ 95%. A lot or a little depends on the tasks that you are going to solve with the help of this base.
Demo - Identify your country and city by IP address
To install the database, I recommend using programs like mysqldumper or via ssh to execute
mysql –p –user database <file.sql
The “ update script ” (~ 300Kb, after installing ~ 1Mb) is adapted only for the current version of the database (June 2011), it is impossible to update with the previous versions with its help . To update the database, import the geo_update_2011_06.sql file (contains two technical tables), download the latest archives with maxmind and ipgeobase (see readme.txt) and run update_maxmind.php and update_ru.php from the console.
In the directory of countries there are islands that are not independent states, but significantly removed from their metropolitan areas.
In the directory of cities errors are possible (including duplicates).
In the “Only countries” database there are IP blocks of only European countries (from ipgeobase, net_euro table) and countries all over the world (including European, from maxmind, net_country_ip table). Theoretically, European countries should be more accurately determined by the first option, but there was no practical test.
Ideas to improve and improve the quality of the base are welcome.
In the current version of the base 94,615 settlements.
The number of settlements in different countries:
|The Republic of Korea||166|
|Trinidad and Tobago||79|
In other countries, less than 30 settlements.
The maxmind database update script has been optimized, the operation is performed faster and consumes less computational resources.