webcornea Posted October 15, 2007 Share Posted October 15, 2007 hello, i am building a php based site and need to have search based on zip code and locations. what is the best possible solution for doing this? i want to do searches like search within XX miles of zip code xxxxx please help thank you Quote Link to comment https://forums.phpfreaks.com/topic/73269-zip-codelocation-implementation/ Share on other sites More sharing options...
Psycho Posted October 15, 2007 Share Posted October 15, 2007 You would need a database of zip codes and their approximate positions (lattitude & longitude). You can then calculate the distance between two positions. Every implementation I have seen "assumes" the position of the business is 0 miles if the start position is in the same zip code. Here is one vendor that supplies such a database for $150: http://www.melissadata.com/zd.html Here is the demo page: http://www.melissadata.com/Lookups/zipdistance.asp Quote Link to comment https://forums.phpfreaks.com/topic/73269-zip-codelocation-implementation/#findComment-369685 Share on other sites More sharing options...
webcornea Posted October 15, 2007 Author Share Posted October 15, 2007 that is quite pricey, are there any others? i also wanted to clarify that i only want to implement search based on location like myspace.com or ebay.com where people can search for products and users within a certain area based on zip code. please help thank you Quote Link to comment https://forums.phpfreaks.com/topic/73269-zip-codelocation-implementation/#findComment-369717 Share on other sites More sharing options...
webcornea Posted October 15, 2007 Author Share Posted October 15, 2007 what do you guys think the google maps API? is it too complicated, fancy to do what i am trying? Quote Link to comment https://forums.phpfreaks.com/topic/73269-zip-codelocation-implementation/#findComment-369974 Share on other sites More sharing options...
MmmVomit Posted October 15, 2007 Share Posted October 15, 2007 that is quite pricey, are there any others? http://www.buyzips.com/ Quote Link to comment https://forums.phpfreaks.com/topic/73269-zip-codelocation-implementation/#findComment-369976 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.