Avatar of beatboxradio
beatboxradioFlag for Canada

asked on 

Looking for a list of provinces/states per country

Good day everyone,

Does anybody have a list/database of all the provinces/states per country OR know where I could find any ?
I'm making a web-based application and I'd need those states and provinces to put them in some listboxes that would eventually be updated dynamically through AJAX.

I don't absolutely need ALL the countries, but at least the provinces of Canada and the states of the U.S.A

Thank you very much !
PHPMySQL Server

Avatar of undefined
Last Comment
koolie
Avatar of 4drenalin3
4drenalin3

These are the provinces of the USA and Canada

USA:
http://www.sunrisesunset.com/usa/
Canada:
http://pgrc3.agr.ca/cgi-bin/npgs/html/statelist.pl?Canada
Avatar of Aamir Saeed
Aamir Saeed
Flag of Pakistan image

I dont think there is any site which is providing this facility. You can find countries and states/provinces/cities and then you 'll do the next on your own.

http://www.xist.org/default1.aspx
Avatar of beatboxradio
beatboxradio
Flag of Canada image

ASKER

Thank you guys, but I forgot to mention that I also need the cities of all those states and provinces
for both Canada and the U.S.A.

Since I need to insert all of them in an database, it would be preferable if anybody had a database of those countries/provinces/cities or a textfile containing all of them.

Thanks
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

I believe you are in for a bit of research.  Countries I found.  States/provinces I found.  I even found one for counties.  For CITIES....you're asking for a huge amount of data.  Luckily, the American beaucracy is pretty good at compiling mountains of data for no other purpose.  :)  I recommend you start here:

http://www.usgs.gov/pubprod/
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Here's a couple people who over it:

http://forums.digitalpoint.com/showthread.php?t=33139
Avatar of beatboxradio
beatboxradio
Flag of Canada image

ASKER

hmmm those are huge, what I need isn't such a big database.
I need the cities per provinces of Canada, and IF possible (not a must) those of the U.S.A.

Thanks
Avatar of Rob_Jeffrey
Rob_Jeffrey

I am downloading the free linked one now - I'll see if I can easily export the data you are looking for.
The uncompressed file is a 119Mb text file - CSV
ASKER CERTIFIED SOLUTION
Avatar of Rob_Jeffrey
Rob_Jeffrey

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of beatboxradio
beatboxradio
Flag of Canada image

ASKER

Thank you very much I appreciate Jeffrey !
Does someone still have this zip file available? It would be highly appreciated!
Avatar of koolie
koolie

I second that request.  If anyone has the raw file, that would be great.  I am not looking for cities though, just state/province and country
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo