Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: Zip Codes

  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Posts
    178
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Zip Codes

    I'd like to build or find a script that will allow me to take a zip code provided buy my user(s) and figure out all the zip codes within a specified radius from that zip code. Can someone point me in the right direction?

    I can use either a CGI script OR PHP. I'm on a Linux/Apache server. I normally don't cross post, but since either version is acceptable, I'm going to do so in this case.

    Please reply to the thread in the CGI forum--here's the link to that thread.

    Thanks for any assistance you can provide.

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    do you have a zip code database with latitude and longitude?

  • #3
    Regular Coder
    Join Date
    Oct 2002
    Posts
    178
    Thanks
    3
    Thanked 0 Times in 0 Posts
    No--do you know how/where I can find one?

    Thx.

  • #4
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you have to buy it.
    you can buy it from here, I don't know how "trustworthy" this site is so heed my warning:
    http://www.zipwise.com/database-more-info.php
    I haven't personally bought any zip code database but someone at work had already acquired a database somehow, I'm not sure of the legality of sharing it since you would think it would be public information. if someone can backup the legality of sharing it then I can hook you up.

  • #5
    Regular Coder
    Join Date
    Oct 2002
    Posts
    178
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I read somewhere that someone obtained a zip code DB from the census bureau. And you'd think the info would be available from the postal service. Both are government agencies.

    I'd even be willing to visit a web site, type in the the zip code and radius and have it tell me the zip codes within that radius--IF such a site is available that is.

    I'm creating a form via which a visitor will tell me the zip codes and radii from them in which he's interested in purchasing property. I don't expect to get a LOT of requests in the beginning so I think I'd be fine with processing each one manually.

  • #6
    Regular Coder
    Join Date
    Oct 2002
    Posts
    178
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Well I found such a site AND it's free!

    http://www.melissadata.com/Lookups/zipradius.asp

    As things grow, I'll probaly have to buy a DB and put together a script to automate the process--but for now this'll be good.

    Thx.

  • #7
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    I've doen this type of thing before for one of my clients. One thing you should probably be aware of is that you will be dealing with spherical coordinates, so you'll have to adjust your distance calculations accordingly. If you google for "distance equation sphere" you should get some results. I think if you add "php" to that, you'll even get some scripts. Most of these require conversion from lat/long info to degrees or radians though. Otherwise the process is pretty simple.

    Also, if you do a google search for "ZCAT Zip code data US Census" you should get some links to the free Census data for ZIP codes.

  • #8
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ZIP Codes

    Hi,

    I think this websites might help you:
    http://www.zipcodeworld.com . It provides free ZIP Code Sample, as well as Distance Calculation Formula. I use this service before and the information is quite complete and updated. Worth to give a try.

    Yogurt


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •