7 Replies - 2172 Views - Last Post: 30 November 2006 - 01:21 PM

#1 theh1tman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 03-October 06

Zip code search

Posted 28 November 2006 - 09:20 AM

I need help in finding out the best way to run a search by zip code. I have a friend whos company wants to have a feature on their website that allows you to type in your zip code and be given a list of the closest store to you based on said zip code and I have no idea where to start. Can anyone help me?
Is This A Good Question/Topic? 0
  • +

Replies To: Zip code search

#2 okyup  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 207
  • Joined: 06-November 06

Re: Zip code search

Posted 28 November 2006 - 09:42 AM

http://en.wikipedia.org/wiki/ZIP_Code
Was This Post Helpful? 0
  • +
  • -

#3 theh1tman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 03-October 06

Re: Zip code search

Posted 28 November 2006 - 09:47 AM

Thats all well and good, but it really doesnt tell me how to set up a zip code search engine in html.
Was This Post Helpful? 0
  • +
  • -

#4 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 204
  • View blog
  • Posts: 4,807
  • Joined: 23-December 05

Re: Zip code search

Posted 28 November 2006 - 12:03 PM

you will need more than html of course to do this, javascript and or php are recommended.
The link above gives you more than enough information, how to store it is really up to you. You need to generate some sort of function that parses the zip code digit by digit. Eg, first digit determines a set or single state. Each number afterwards increases the specifics.
It is going to take some time to code all the zip codes, so i would suggest you create a 'map' like object with the stores connected. Then you can insert the zip code entered by the user to determine the shortest path to a store.

The algorithm to determine the closest i leave to you.
Was This Post Helpful? 0
  • +
  • -

#5 theh1tman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 03-October 06

Re: Zip code search

Posted 28 November 2006 - 12:40 PM

View PostWilliam_Wilson, on 28 Nov, 2006 - 12:03 PM, said:

you will need more than html of course to do this, javascript and or php are recommended.
The link above gives you more than enough information, how to store it is really up to you. You need to generate some sort of function that parses the zip code digit by digit. Eg, first digit determines a set or single state. Each number afterwards increases the specifics.
It is going to take some time to code all the zip codes, so i would suggest you create a 'map' like object with the stores connected. Then you can insert the zip code entered by the user to determine the shortest path to a store.

The algorithm to determine the closest i leave to you.


So what you are saying is that Im mostly on my own and there is no easy tutorial/walkthrough hidden anywhere on the web which means Im totally screwed and this thing is going to take me forever?
Was This Post Helpful? 0
  • +
  • -

#6 y0da  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 62
  • Joined: 08-November 06

Re: Zip code search

Posted 30 November 2006 - 11:14 AM

This would be imposible to do this with just HTML get into PHP...
Was This Post Helpful? 0
  • +
  • -

#7 okyup  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 207
  • Joined: 06-November 06

Re: Zip code search

Posted 30 November 2006 - 11:59 AM

Read the link, it explains how the zip codes are assigned. They go by area. So if someone enters a zip code starting with a certain number, you can determine what area they are in. Lots of work no doubt. No easy solutions that i have, but you might check google.
Was This Post Helpful? 0
  • +
  • -

#8 tody4me  Icon User is offline

  • Banned
  • member icon

Reputation: 12
  • View blog
  • Posts: 1,398
  • Joined: 12-April 06

Re: Zip code search

Posted 30 November 2006 - 01:21 PM

there are files that contain a skelton list of zip codes for the united states out there, just google for them. Then when you come across one that you don't have, go out to mapquest and search by zip code only. That should fix any gaps that would be in the file. Then put it into a database engine and search against it. That's what I'm doing currently for my needs, and it works failrly well. If I run across one that isn't in my list and isn't in mapquest (rare), then I just put in unknown for city and state.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1