Anyone know how I could do some code to lte's say grab all addresses or zip codes within X miles from an address, city or zip code? I think I found some code online to do it for a zip code, but no clue about city or address. If someone could get this or knows how I could pay a decent amount, PM me.
This is really a good question, I think for this you'll have to buy the raw data(specs) or enter it yourself into a database type of architecture.
frankcow here has a nice collection of php-scripts, i bookmarkes this one a few weeks ago: http://www.justin-cook.com/wp/2006/...tal-codes-within-a-certain-distance/#more-150 but you need the geocode (longitude/latitude) for your city to calculate the distance. hope this helps.
I am also looking for another program to change address into longitude and latitude becuase I think that is what most distance calculations use. In my zip database it gives long and lat, but somehow need to change addresses as well. Anyone?
bump.. i need something like http://www.zipcodedownload.com/Products/Category/APIs/ Anything out there that is free? People put in their zipcode, script gives out places based on location of their zip code. Thanks
hmmm.. PHP5 Thanks. Anything for PHP4 though? If not, I'll have to get another host. and check out the comments
http://www.zipcodeworld.com/developers.htm This page has some sample codes for distance calculation. Maybe this is what you are looking for.
You might want to have a look at the Google Maps API, they have some interesting tools for calculating distances between coordinates. Since you want to build some kind of "Yellow Pages" thing, you might want to have a look at the data in the OpenStreetMap project (Wikipedia-style maps project) too. Also, there is a company named Cloudmade. They basically try to give you the OpenStreetMap data in more usable formats, and provide APIs and such.