DB for cities, countries and addresses

Permalink
I am building a signup form and I'd like to put dropping lists with the countries, cities, addresses and postcodes of the world. Does something like that exist? A public / free DB already built to be called from my website?
Thanks

View Replies: View Best Answer
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
Yes, there is! I found this on GitHub, so it's open source!

https://github.com/hiiamrohit/Countries-States-Cities-database...

Live demo:http://lab.iamrohit.in/php_ajax_country_state_city_dropdown/...

You're welcome!
ramonleenders replied on at Permalink Reply
ramonleenders
Just checked if one of my previous home cities was in it, and it wasn't. Also states don't seem all correct (too many). So this one isn't really flawless...
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
I wouldn't expect it to be flawless, considering it's free. The fact that it's open source allows for adding / modifying missing data, and it looks very useful as a starting point.
JohntheFish replied on at Permalink Reply
JohntheFish
Just checked my address with this. I can select Bristol as a state, but not as a city :-(
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
You can use Google maps address lookup API from javascript to add an as-you-type lookup to a text input field.
Google's address data is probably one of the best maintained data sets. Still unlikely to be flawless.
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
I think some sort of integration of this should be added as part of the core, as it would be really useful for Express objects.
Mnkras replied on at Permalink Reply
Mnkras
The core is HIGHLY unlikely to ever rely or work with a 3rd party service out of the box. There are several reasons for this.

1. Services close/stop (Picnik as the image editor in old c5 versions)
2. Services change (API versions become deprecated)
3. Services rate-limit (Anything google related for example requires a per site API key to use)

For this type of data, to get something remotely accurate you probably have to buy it off of some company.
JohntheFish replied on at Permalink Reply
JohntheFish
I agree with all those points, yet we still have a google maps block bundled with the core.
Mnkras replied on at Permalink Reply
Mnkras
Yep, and it breaks every year :D