PHP Coding for Zip Codes - where to get the information?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cardinal
Forum Newbie
Posts: 14
Joined: Mon Jun 01, 2009 2:29 pm

PHP Coding for Zip Codes - where to get the information?

Post by cardinal »

Hi all, I'm not sure if this should go into a SQL or PHP or Misc forum but here it goes -

I'm looking for an up to date database of all the zip codes in the United States (preferrably other countries too, but let's start with the US). The information should also include Latitude and Longitude information (for calculating distances between two zip codes) as well as City/State/Region information associated with each zip code (so when the user enters a zip code number I can correlate it to the City/State/Region and fill it in automatically).

I've Googled the heck for this info but it looks like most of the information online is severely dated going back to 2004/2005 with 43k zip codes and from what I understand there are now 79k zip codes.

I guess the real question here is how do most of you get this information? I think the PHP coding would be fairly straightforward, but acquiring the information, especially current information seems extremely difficult.

Basically I want this information to be able to find the closest members of my site given a specific zip code as well as sort by distance, and find distance between two members.. I think that's what most business sites have right?

Thanks, any help is really appreciated,
Card
Post Reply