Forum Moderators: coopster

Message Too Old, No Replies

how to search locations based on states and distance

USA states ZIP and distance based search

         

female designer

5:48 am on Dec 20, 2006 (gmt 0)

10+ Year Member



Hi guys,

I am new to php so accept my appologies if i sound idiot somewhere in my post :D

i want to make a property dealers search form in USA. that will be like

Enter your zip:
enter distance from you: (5/8/12 etc Miles)

Search Now Button

and the script should show the results from database of dealers based on the user's zip and the distance he entered.

should i buy a zip code database for States? and what else I need to do, i cant get started please help :)

mcibor

11:10 am on Dec 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to calculate distance between the user zip and your dealer's zip.

You can try the following links:

[cryptnet.net...] - however it's only for postgres now
or
[hotscripts.com...]

Then you have to compare the distance with given and show only those dealers that are nearer.

Merry Xmas
Michal Cibor