Question : How do I perform Proximity Search using the database provided by IPINFODB

How do I perform Proximity Search using the database provided by IPINFODB

http://ipinfodb.com/ip_database.php

I am using the following: http://ipinfodb.com/download.php?file=ipinfodb_one_table_full.sql.bz2

Answer : How do I perform Proximity Search using the database provided by IPINFODB

A proximity search using latitude and longatude will be incredibly slow, I wouldn't advise it. The query above will return the lat and long for the IP. You would then have to do some lat/long calculations for your 5 mile raduis and add a where clause, something like the following:-

WHERE latitude BETWEEN $min_lat AND $max_lat
AND longitude BETWEEN $min_long AND $max_long

Check out this thread for raduis calcs using lat and long:-
http://www.experts-exchange.com/Database/GIS_and_GPS/Q_23027761.html

If youcome up with some code to debug, I'd be glad to help you with that. It's quite unreasonable to expect the code to be written up for you though.
Random Solutions  
 
programming4us programming4us