RogerZF
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Find other users near current user
in PHP Coding Help
Posted
I have a HUGE list (thousands) of IP addresses in a MySQL database. I can match IP's with longitudes/latitudes. My problem is finding other users close to the current logged in user. Do I need to match longitude/latitude for EVERY IP and calculate distance? Wouldn't that KILL the server AND the SQL server?
What's the most efficient way of doing this? I know Myspace has a "find users close to you" feature, but I can't figure out how they made theirs. Also, I don't think zip code is much of an option as not every country has a zip code. I have TONS of international visitors (USA, Europe, Australia, Canada, UAE, etc.). Do all those countries have zip codes? I can't think of an efficient way of doing this without killing the server.