retrieving a updated list of countries states and cities in a website
I'm trying to create a User Registration page in ASP.NET and wondering what is the best way to get the list of up-to-date Countries and Cities? Are there any Web Services on the web that I can use to retrieve such information? If not开发者_StackOverflow社区, what are the options?
Please, any suggestions and pointers will be very much appreciated
How about this? http://www.maxmind.com/app/web_services_country_usage
I have not tried it myself though.
You can check angrymonkeycloud.com/geography to get full list of countries and their states (subdivision).
You can even get countries primary language and currency to set it as your users default settings.
There are a lot of sources for the information on complete lists of countries and major cities. The United Nations Statistics Division's annual demographic yearbook has a list of major cities > 100K population in CSV format:
http://unstats.un.org/unsd/demographic/products/dyb/dyb2012/Table08.xls
The CIA World Factbook also has a list of major cities in the world at:
https://www.cia.gov/library/publications/the-world-factbook/fields/2219.html
They also keep a list of bitmap images for the corresponding country flags:
https://www.cia.gov/library/publications/the-world-factbook/docs/flagsoftheworld.html
I also keep a large links and copies of these types of datasets in our own custom CSV format at this URL:
http://www.opengeocode.org/cude1.1/index.php
Yes I worked for an organization that used this: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm for countries; there are other sources too that are valid that I can't currently find. There are state code lists but I haven't seen city. I've not seen any web services offerings; the one listed below was news to me...
We typically attempted to standardize with these codes, loaded them into a database, and even had a central database with these values that other DB's referenced too.
HTH.
精彩评论