This content has been marked as final. Show 5 replies
They have a database that contains zip codes and the longitude and
latitude coordinates of the center of the zip codes. They then use a
formula ranging from basic algebra to fancy calculus that takes into
count the curvature of the earth to find all other zip codes centers
within a given distance.
There are many sources of the zip code database from free to costly.
The formulas can easily be found on Google as well as step by step
tutorials on how to put it all together.
I wrote an app a few years ago that tells distance between zipcodes. You need to have a table with all the zipcodes in it along with the Long and Lat of the zipcodes. If two zips are entered submitted, you just use the associated Lat & Long to calulate the distance between the two points. I think I got the zipcode database from the US postal service site.
Here is the code from cflib.org that calculates the distance.
Incase anyone else needs it, I found a good database at: