Base GeoIP - countries and cities, June 2011 (+ update script)
An updated version of the Russian-language database of countries and cities was published. Main changes:
- due to the new database ipgeobase.ru, the accuracy of determining the cities of Ukraine has increased
- From the free version of the base geobaza.ru cities have disappeared, so 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)
- net_ru_2 and net_su tables were removed from the database, query examples were changed
The result of this work is available for free download.
The base is distributed in two versions: " Countries and cities " (21Mb, after installation ~ 122Mb) and " Only countries " 2Mb, after installation ~ 13Mb). Also in the archives is a small example of using the database on php.
The accuracy of the definition of the country is ~ 99%, the accuracy of determining the cities is ~ 95% average. A lot or a little - depends on the tasks that you are going to solve with the help of this database.
Demo - definition of your country and city by IP-address
To install the database, I recommend using programs like mysqldumper or through ssh
mysql -p -user database_data <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 its help previous versions . To update the database, import the file geo_update_2011_06.sql (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 are far removed from their metropolises.
In the directory of cities errors (including duplicates) are possible.
In the "Only Country" database there are blocks of IP only in European countries (from ipgeobase, net_euro table) and countries all over the world (including European ones, from maxmind, net_country_ip). Theoretically, European countries should be more accurately defined by the first option, but there was no practical verification.
Ideas for improving and improving the quality of the database are welcome.
In the current version of the base there are 94,615 settlements.
Number of settlements in different countries:
|The Republic of Korea||166|
|Trinidad and Tobago||79|
In the remaining countries less than 30 settlements.
Posted on 06/09/2011
The script for updating the maxmind database has been optimized, the operation is faster and consumes fewer computing resources.