An updated version of the Russian-language database of countries and cities has been released.
The database is distributed in two versions: "
Countries and cities " (13Mb, after installing ~ 74Mb) and "
Only countries " (2Mb, after installing ~ 9Mb). 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%, the accuracy of determining the cities of Ukraine ~ 50%. A lot or a little depends on the tasks that you are going to solve with the help of this base.
Test demo -
determine your country and city by IP-address')
Work demo -
definition of your city in the form of air ticket searchTo install the database, I recommend using programs like
mysqldumper or via ssh to execute
mysql –p –user database <file.sqlThe “
update script ” (~ 1Mb, after installing ~ 5Mb) is adapted only for the current version of the database (September 2013), it is impossible to update old versions with it. To update the database, import the geo_update_2013_09.sql file (contains two technical tables), download the latest archives with maxmind and ipgeobase and run update_maxmind.php and update_ru.php from the console. Update maxmind database of cities takes 10-15 minutes.
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.
Some statistics
In the current version of the base
54,912 settlements.
The number of settlements in different countries:A country | amount |
---|
USA | 14,534 |
France | 4,957 |
Germany | 4,148 |
Italy | 3.244 |
Australia | 2,986 |
Great Britain | 2,496 |
Spain | 2,153 |
Canada | 1,701 |
Russian Federation | 1,284 |
Austria | 1,045 |
Brazil | 805 |
Poland | 775 |
Switzerland | 735 |
Japan | 725 |
Netherlands | 691 |
Portugal | 585 |
Ireland | 566 |
Mexico | 554 |
Sweden | 530 |
Czech | 506 |
China | 492 |
India | 420 |
Argentina | 396 |
Belgium | 394 |
Greece | 370 |
Ukraine | 357 |
Turkey | 338 |
Philippines | 326 |
South Africa | 311 |
Bulgaria | 289 |
Romania | 269 |
Croatia | 259 |
Hungary | 258 |
New Zealand | 258 |
Denmark | 247 |
Norway | 237 |
Finland | 216 |
Colombia | 214 |
Thailand | 178 |
Indonesia | 171 |
Slovakia | 157 |
Malaysia | 138 |
Chile | 133 |
Slovenia | 119 |
Costa Rica | 117 |
Latvia | 102 |
Kazakhstan | 96 |
Peru | 96 |
Serbia | 95 |
Israel | 95 |
Venezuela | 94 |
The Republic of Korea | 85 |
Estonia | 81 |
Ecuador | 79 |
Luxembourg | 79 |
Iran | 71 |
Vietnam | 70 |
Belarus | 70 |
Morocco | 60 |
Sri Lanka | 59 |
Lithuania | 56 |
Bosnia and Herzegovina | 56 |
Cyprus | 53 |
Puerto rico | 52 |
Nigeria | 51 |
Pakistan | 49 |
Uruguay | 49 |
Taiwan | 48 |
Dominican Republic | 45 |
Jamaica | 42 |
Algeria | 40 |
Tunisia | 39 |
Salvador | 39 |
Armenia | 38 |
Panama | 36 |
Macedonia | 35 |
Moldova | 34 |
Mauritius | 34 |
Iceland | 34 |
Honduras | 34 |
Trinidad and Tobago | 34 |
Guatemala | 33 |