Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Sorting users by Location
02-15-2013, 04:40 PM #1
- Join Date
- Jan 2005
- Thanked 0 Times in 0 Posts
Sorting users by Location
I'm not even sure where to begin with this, but maybe someone can point me in the right direction. Our website has a number of registered users who fill out their location "city/country" and we have a "Members" page that lists everyone. What we would like to do is simply sort this list so that if you login from "Nashville, TN" it will show you other users from there, and then from nearby locations/cities...
How exactly would one go about doing this... do we need to capture IP addresses and then reference somehow??
02-16-2013, 05:51 PM #2
- Join Date
- Jan 2011
- Thanked 748 Times in 746 Posts
Kinda says your in Europe. In which case you should have a state column for people from the USA. Then to find people close to a new registered user search for city or country and display them as really close people. If you do the state, you can search on that, exclude the city and display as not so close and alphabetize. If you want to list by distance you will need to get Lon/Lat for every location and do Math.fill out their location "city/country"
FYI: My IP puts me 250 miles away from where I really am.