Nearest Office by Zipcode

From: Date: Fri, 26 Jul 2002 15:40:43 +0000
Subject: Nearest Office by Zipcode
Groups: php.windows 
Request: Send a blank email to php-windows+get-14977@lists.php.net to get a copy of this message
I finally finished my "Nearest Office by Zipcode" finder PHP app. Many people had expressed interest in this script so I would like to know where I can post it to share with the group. The script uses a point to point calculation based on longitude and latitude from a zipcode database that can either be bought, or downloaded freely on the internet(it is older so many new zips may not be in the db). There is a neccessary conversion script that converts the latitude and longitude into radians and writes those values to the database, and then the main script which uses the user supplied zipcode to compare to a table of known office location (zipcode, latitude and longitude expressed in radians) and cacluates the distance between each office and the users zipcode. It is quite accurate, although if you compare the mileage to a mapping program like Mapquest it may be different because they are using street calculations whereas this script is a point to point calculation. The script is very simple but would not be possible without the help of many people on the list. Thanks, Ron

« previous php.windows (#14977) next »