This is a Mysql database of a host of zip code information, along with the scripts used to create it and other utility scripts. The data is based on public domain data made available by the U.S. Census Bureau. In addition to this, however, I have added fields for the nearest 30 and nearest 100 zip codes to each other zip code -- sorted in order of proximity.
mysqldump file, gzipped (7.1meg)
I am in the process of regularizing some of the differences between the 1990 and 2000 data. The 1990 data has additional zip codes -- primarily corporate ones, I gather -- which were eliminated from the 2000 data. The 2000 data, however, has different and presumably improved latitude and longitude information. You can browse the merged database using the script below.
zipcode lookup script and source code in Perl and PHP
Below are links for the code and sources for the database.