Helpful Information
 
 
Category: Perl Programming
Location with IP

Just out of curiousity, is there any way to determine the general location (for example, the city) of the user by the IP? All is needed is just a database that tells us where the IP subgroup belongs to. 128.220.*.* belongs to baltimore MD, etc.

That would be neat if that can be done

You should use Host address instead. The best you can do is to determine the country by the last (right-most) set after the dot.
Even the IP is reverse looked up, it might not give you much info to determine the location.
Unless you run an ISP and use selective relaying to their SMTP server to restrict relaying only to their customers based on their IPs, it's a waste of time and resource to do such thing.

If you are interested in finding a full list of country prefix, download -> http://www.perl.com/CPAN-local/modules/by-module/Net/Net-Country-0.1.tar.gz










privacy (GDPR)