anujgarg Posted August 30, 2008 Share Posted August 30, 2008 Hi I am trying to enable radius search in my website. I have the required table for US zip codes with Longitude and Latitude. I just want to have some code to get the location by distance. Any Idea? TIA Link to comment https://forums.phpfreaks.com/topic/122014-radius-search/ Share on other sites More sharing options...
QuietWhistler Posted August 30, 2008 Share Posted August 30, 2008 You can use the phpZipLocator class. You can download it at http://www.sanisoft.com/downloads/ziploc/phpZipLocator.zip. You can then calculate the distance like this: <?php $oZip = new phpZipLocator(); $distance = $oZip->distance( $zip1, $zip2 ); ?> Link to comment https://forums.phpfreaks.com/topic/122014-radius-search/#findComment-629853 Share on other sites More sharing options...
Barand Posted August 30, 2008 Share Posted August 30, 2008 here's the formula for finding distance from long and lat http://www.phpfreaks.com/forums/index.php/topic,166487.msg733106.html#msg733106 Link to comment https://forums.phpfreaks.com/topic/122014-radius-search/#findComment-630012 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.