nevynev Posted July 30, 2007 Share Posted July 30, 2007 Hi there, I need a list of Major cities and countries (preferably provided in a related manner) for a database. Is there somewhere which provides it preformatted so I can simply enter them all at once into a database rather than having to do it manually. Thanks NevyNev Quote Link to comment https://forums.phpfreaks.com/topic/62518-list-of-cities-and-countries/ Share on other sites More sharing options...
cooldude832 Posted July 30, 2007 Share Posted July 30, 2007 probably not for free, however if you use cURL() or fopen() or a socket you might be able to make a program in php that will query usps.gov for zip codes (everyone from 00000 to 99999) and you can then get a relationship between states,zip,city so to speak of and then simply do the same for any other country you want, store it in mysql and be done Quote Link to comment https://forums.phpfreaks.com/topic/62518-list-of-cities-and-countries/#findComment-311178 Share on other sites More sharing options...
nevynev Posted July 30, 2007 Author Share Posted July 30, 2007 Sounds a little tricky! Anyone else got any other sources? Thanks NevyNev Quote Link to comment https://forums.phpfreaks.com/topic/62518-list-of-cities-and-countries/#findComment-311248 Share on other sites More sharing options...
nevynev Posted July 31, 2007 Author Share Posted July 31, 2007 Bump Quote Link to comment https://forums.phpfreaks.com/topic/62518-list-of-cities-and-countries/#findComment-311789 Share on other sites More sharing options...
nevynev Posted August 1, 2007 Author Share Posted August 1, 2007 BUMP Quote Link to comment https://forums.phpfreaks.com/topic/62518-list-of-cities-and-countries/#findComment-313377 Share on other sites More sharing options...
cooldude832 Posted August 1, 2007 Share Posted August 1, 2007 do what I said, you can find tutorials on it. Quote Link to comment https://forums.phpfreaks.com/topic/62518-list-of-cities-and-countries/#findComment-313379 Share on other sites More sharing options...
nevynev Posted August 6, 2007 Author Share Posted August 6, 2007 Found a solution on the mysql site: Info: http://dev.mysql.com/doc/world-setup/en/world-setup.html Download the .sql file - http://dev.mysql.com/doc/ Perfect! Pass this on in future. NevyNev Quote Link to comment https://forums.phpfreaks.com/topic/62518-list-of-cities-and-countries/#findComment-316581 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.