[thelist] ?? How To: Search Zip Codes within x Miles ??

Stephen Van Doren :: Fusionbox svandoren at fusionbox.com
Fri Jan 19 09:28:28 CST 2007


----- Original Message ----- 
From: "Casey Crookston" <caseyc at IntelliSoftmn.com>
To: <thelist at lists.evolt.org>
Sent: Friday, January 19, 2007 8:20 AM
Subject: Re: [thelist] ?? How To: Search Zip Codes within x Miles ??

> I wonder.... is there a web service into which we pass a zip code and a
> distance, and it returns a list of all zip codes within that range?
> From that array I could compare the zip codes inn our database.

If I can be so bold, if you have the server and the time, it's best to 
develop this on your own and use values that you generate, rather than 
relying on an outside source. When you do that, and you hinge an entire part 
of your system on it, you risk getting slow data--and what if that service 
just happens to one day go belly up?

There are PHP functions that do precisely what you're looking for, and are 
relatively easy to implement, from what I can see.

First you need the latitude and longitude, as previously mentioned, of the 
zip code entered by the user. There are SQL tables that exist that are full 
of this data. You shouldn't have trouble finding one. With that data, you 
can construct the mathematics around the systems used at 

More information about the thelist mailing list