Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP library with Countries, States and Cities [closed]

I am currently working on a PHP application that puts me in the desperate need of all the Countries, States and Cities in the world.

In the application, when you select a Country from the drop down menu, it loads up all the States in the selected Country into another drop down menu. When you then select a State from the newly generated drop down menu, it then loads up all the cities in the selected State into another drop down menu.

The challenge now is getting all the Countries, States and Cities. I have tried searching Google without results.

Am wondering if there is any PHP library or application that has all Countries, States and cities in it, so i can download and extend.

Thanks very much for your time.

like image 463
IndexController Avatar asked Mar 05 '10 01:03

IndexController


2 Answers

A good place to start would be MaxMind PHP library which uses the freely available MaxMind.com database

like image 123
Richard Harrison Avatar answered Oct 10 '22 10:10

Richard Harrison


there is GeoDataSource World Cities Database (Gold Edition) March.2010. This contains:

  • city database
  • latitude longitude
  • city latitude
  • cities database
  • world cities
  • global cities
  • world countries
  • distance calculator
  • state list
  • gazetteer
  • place names
  • populated places
  • GPS

and more, there is even a basic and premium package.

** EDIT

May not be worthwhile if your looking for something free however because the free package only offers city names. The basic package is One Month - $149.95 One Year - $449.95

and the packages only get more expensive.

like image 23
Justin Gregoire Avatar answered Oct 10 '22 09:10

Justin Gregoire