xcoderx Posted May 9, 2010 Share Posted May 9, 2010 anyone know where i could find the coding or source along with database to that option for registration where when u selete a country automatically select state from that country with names of states pop up? Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/ Share on other sites More sharing options...
co.ador Posted May 9, 2010 Share Posted May 9, 2010 you looking to do a search engine form where users can search through states? or you are trying to do a registration form? Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055464 Share on other sites More sharing options...
xcoderx Posted May 9, 2010 Author Share Posted May 9, 2010 a registration something like this site http://www.adhitz.com/en/Register when u select united states below all states from united states will display Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055500 Share on other sites More sharing options...
xcoderx Posted May 9, 2010 Author Share Posted May 9, 2010 i basically want the coding maybe someone knows? i tried everywhere some i found but they do not have states for all country listed Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055512 Share on other sites More sharing options...
co.ador Posted May 9, 2010 Share Posted May 9, 2010 For a world wide country database I know of two ways. One way is to create a script that stores the country, city, zip or neighborhood etc as users start registration. For that you are going to have to create a similar form with a script that stores the data in the database. The other way you can do it is by buying a database at http://www.zipcodeworld.com/ Also there is a basic database an out of date database which you can download at this site if I am not mistaken, It's all I know. Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055518 Share on other sites More sharing options...
xcoderx Posted May 9, 2010 Author Share Posted May 9, 2010 ah they are costly. isnt there any free available? all i want is country and state not cities. i needed the database basically for rest i can manage Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055519 Share on other sites More sharing options...
co.ador Posted May 9, 2010 Share Posted May 9, 2010 someone once refer me to one once and it was of a lot of help let me see if I find it Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055520 Share on other sites More sharing options...
xcoderx Posted May 9, 2010 Author Share Posted May 9, 2010 it would be great bro if u could find me, its been sometime i been trying to find one but all are like buy them and they ask for alot of money. if get a free one whats the harm :-) Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055521 Share on other sites More sharing options...
co.ador Posted May 9, 2010 Share Posted May 9, 2010 I have one but from the states only What's your gmail? Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055523 Share on other sites More sharing options...
xcoderx Posted May 9, 2010 Author Share Posted May 9, 2010 bro for usa i have seen free one for a few countries but im needing for worldwide. Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055525 Share on other sites More sharing options...
co.ador Posted May 9, 2010 Share Posted May 9, 2010 http://www.transferbigfiles.com/dffce13f-e041-4d68-9272-a1c696afe8b6?rid=i3MFWD0hP6fD33%2bKh%2b2dNQ%3d%3d Sorry i don't have a world wide one if you get one let me know! Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055560 Share on other sites More sharing options...
xcoderx Posted May 10, 2010 Author Share Posted May 10, 2010 found one but its for $45 i think this is the cheapest one http://www.worldcitiesdatabase.com/world-cities.aspx but i needed one for free :-( Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055661 Share on other sites More sharing options...
JonnoTheDev Posted May 10, 2010 Share Posted May 10, 2010 Just find a website that has it on. View the HTML source and scrape the data. Simple. Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055788 Share on other sites More sharing options...
xcoderx Posted May 10, 2010 Author Share Posted May 10, 2010 but it will take me ages and then structure it. but yes i actually can do it. but need to know some site which carries list of states from all countries Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055798 Share on other sites More sharing options...
JonnoTheDev Posted May 10, 2010 Share Posted May 10, 2010 but it will take me ages and then structure it. but yes i actually can do it. but need to know some site which carries list of states from all countries Yes. The website that you have put in your OP http://www.adhitz.com/en/Register has all the US states in the source code. I could scrape this and structure it in 5 minutes. I do not understand why you would want this for all countries just for a registration form. Countries are not all split into states like the USA. The UK is split into counties, other countries are split by provinces or regions and some places overlap regions, etc. If you are going to do this for every country then it is a big job, there is no getting away from it. I have done this before going right down to countries -> regions -> cities -> towns -> suburbs. The best free place to get this data is Wikipedia. Even if you pay for the data there is no guarantee that it will be correct. Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1055935 Share on other sites More sharing options...
xcoderx Posted May 10, 2010 Author Share Posted May 10, 2010 then could u suggest me on how do i make the registration for my classifieds site? i want it be for international and if someone from some country post somethin it should be easily be searchable. i hope u r getting my concept? could you gue me with this concept then? Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1056025 Share on other sites More sharing options...
JonnoTheDev Posted May 10, 2010 Share Posted May 10, 2010 Why not let the users do it for you. Start off with countries. Let the users enter the states / regions / locations etc. Just as DMOZ does http://www.dmoz.org/Regional/ If a location has already been created then another user can select it also. You would not want classified ads at a state level. States / regions / counties are far too large an area. Fo instance if I wanted a classified in the UK I would not want it placed in UK -> Greater Manchester. The area is far too large. I would want UK -> Greater Manchester -> Manchester -> Prestwich. You could go even deeper than that with the way other countries are divided. Look at the breadcrumbs on this page: http://www.dmoz.org/Regional/Europe/United_Kingdom/England/Manchester/Prestwich/ Also look how deep this page is for Wyoming in the state of West Virginia USA. It also goes deeper into towns. http://www.dmoz.org/Regional/North_America/United_States/West_Virginia/Counties/Wyoming/ Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1056159 Share on other sites More sharing options...
xcoderx Posted May 11, 2010 Author Share Posted May 11, 2010 god bless bro this is something i like. ok say for example i let users enter it but by any means if a user say makes a spelling mistake in state/region/location etc how will that be fixed? then even if it exsist other user will again try to enter same kind of name but with different character. what will the solution for that be? Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1056334 Share on other sites More sharing options...
JonnoTheDev Posted May 11, 2010 Share Posted May 11, 2010 There will have to be a degree of moderation. So, you will obviously approve the classifieds before they go onto your website (otherwise you will end up with spam). This is where you can check the data. In the process where a user submits a classified you could first get them to navigate to the location where the ad will appear rather than selecting from a drop list, so I would click on UK -> Manchester. If my location is not listed then I could suggest it at that point to go into the current screen i.e Prestwich (UK -> Manchester -> Prestwich). If you look at DMOZ again, when I am on the following page I can submit my url http://www.dmoz.org/Regional/Europe/United_Kingdom/England/Manchester/Prestwich/ by clicking the suggest URL link. Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1056376 Share on other sites More sharing options...
xcoderx Posted May 26, 2010 Author Share Posted May 26, 2010 found the free solution at last :-) lol http://www.darwinshome.za.net/demo/xmlworld/ Quote Link to comment https://forums.phpfreaks.com/topic/201169-country-and-state-database/#findComment-1063619 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.