Author Topic: country and state database?  (Read 1095 times)

0 Members and 1 Guest are viewing this topic.

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
country and state database?
« on: May 09, 2010, 12:45:41 PM »
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?

Offline co.ador

  • Devotee
  • Posts: 724
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #1 on: May 09, 2010, 01:28:14 PM »
you looking to do a search engine form where users can search through states? or you are trying to do a registration form?
:) Help others and you will be helped,

I have learn through help, that Debugging and code ordering are extremely important tools to help my programming.

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #2 on: May 09, 2010, 03:15:46 PM »
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

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #3 on: May 09, 2010, 03:54:34 PM »
i basically want the coding maybe someone knows? i tried everywhere some i found but they do not have states for all country listed

Offline co.ador

  • Devotee
  • Posts: 724
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #4 on: May 09, 2010, 04:20:25 PM »
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.
:) Help others and you will be helped,

I have learn through help, that Debugging and code ordering are extremely important tools to help my programming.

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #5 on: May 09, 2010, 04:24:43 PM »
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

Offline co.ador

  • Devotee
  • Posts: 724
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #6 on: May 09, 2010, 04:32:20 PM »
someone once refer me to one once
and it was of a lot of help let me see if I find it
:) Help others and you will be helped,

I have learn through help, that Debugging and code ordering are extremely important tools to help my programming.

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #7 on: May 09, 2010, 04:35:35 PM »
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 :-)

Offline co.ador

  • Devotee
  • Posts: 724
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #8 on: May 09, 2010, 04:40:37 PM »
I have one but from the states only

What's your gmail?

« Last Edit: May 09, 2010, 04:44:18 PM by co.ador »
:) Help others and you will be helped,

I have learn through help, that Debugging and code ordering are extremely important tools to help my programming.

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #9 on: May 09, 2010, 04:46:50 PM »
bro for usa i have seen free one for a few countries but im needing for worldwide.

Offline co.ador

  • Devotee
  • Posts: 724
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #10 on: May 09, 2010, 06:30:27 PM »
« Last Edit: May 09, 2010, 06:31:18 PM by co.ador »
:) Help others and you will be helped,

I have learn through help, that Debugging and code ordering are extremely important tools to help my programming.

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #11 on: May 10, 2010, 01:47:00 AM »
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 :-(

Offline neil.johnson

  • Guru
  • Fanatic
  • *
  • Posts: 3,416
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #12 on: May 10, 2010, 09:23:23 AM »
Just find a website that has it on. View the HTML source and scrape the data. Simple.
Quote
To start, press any key. Where's the 'Any' key?

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #13 on: May 10, 2010, 09:50:19 AM »
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

Offline neil.johnson

  • Guru
  • Fanatic
  • *
  • Posts: 3,416
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #14 on: May 10, 2010, 12:26:21 PM »
Quote
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.
« Last Edit: May 10, 2010, 12:28:20 PM by neil.johnson »
Quote
To start, press any key. Where's the 'Any' key?

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #15 on: May 10, 2010, 01:55:03 PM »
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?

Offline neil.johnson

  • Guru
  • Fanatic
  • *
  • Posts: 3,416
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #16 on: May 10, 2010, 06:19:43 PM »
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/
« Last Edit: May 10, 2010, 06:25:13 PM by neil.johnson »
Quote
To start, press any key. Where's the 'Any' key?

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #17 on: May 11, 2010, 06:22:39 AM »
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?

Offline neil.johnson

  • Guru
  • Fanatic
  • *
  • Posts: 3,416
  • Gender: Male
    • View Profile
Re: country and state database?
« Reply #18 on: May 11, 2010, 07:35:16 AM »
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
To start, press any key. Where's the 'Any' key?

Offline xcoderxTopic starter

  • Devotee
  • Posts: 816
  • Gender: Male
    • View Profile
    • Free online classifieds listing Solution!
Re: country and state database?
« Reply #19 on: May 26, 2010, 10:36:59 AM »
found the free solution at last :-) lol

http://www.darwinshome.za.net/demo/xmlworld/