This script downloads the following files to the download folder:
- http://download.geonames.org/export/dump/allCountries.zip
- http://download.geonames.org/export/dump/alternateNames.zip
- http://download.geonames.org/export/dump/admin1CodesASCII.txt
- http://download.geonames.org/export/dump/timeZones.txt
- http://download.geonames.org/export/dump/featureCodes_en.txt
- http://download.geonames.org/export/dump/iso-languagecodes.txt
- http://download.geonames.org/export/dump/countryInfo.txt
After downloading the files, the 2 zipped files allCountries.zip and alternateNames.zip are unzipped by the script itself. Then correspoding database tables are created for the above downloaded files to import.
| Filename | Database Tables Name |
|---|---|
| allCountries.txt | geo_name |
| alternateNames.txt | geo_alternateNames |
| admin1CodesASCII.txt | geo_admin1 |
| timeZones.txt | geo_timeZones |
| featureCodes_en.txt | geo_featureCodes |
| iso-languagecodes.txt | geo_languagecodes |
| countryInfo.txt | geo_country |
Then all the information is imported from files to their corresponding tables.
Note: Please create the database first and then the database name in the config.php file