You should really consider using a database for this kind
of thing if you're going to be doing it more than
occasionally. I implemented a "location search"
on a website that I developed using this
methodology and it works great.
- find latitude/longitude of the location the
searcher is interested in
- determine latitude/longitude of "bounding box" that bounds
an area N miles from the latitude/longitude of the search
location be sure to take the curvature of the earth
into account when doing this computation.
- select all location of interest from the DB with a
simple SQL query: select * from LOCATION where LATITUDE
between LATMIN and LATMAX and LONGITUDE between LONMIN and LONMAX