Geolocation data via dating site ads
Ever see those sketchy banner ads that say that conveniently say that you can meet somewhen near where you live? In order to do that, they use geolocation data, which you can use for free with one simple trick :)
For example, I’m using Verizon DSL and my IP’s whois information returns Reston, VA. The hostname is “herntx.dsl-w.verizon.net” (probably referring to Hearne, Texas, about 25 miles away). I’m physically located in College Station, which their geolocation data correctly determines.
Without further ado, here is a Perl script that tells you where you are currently located:
use LWP::Simple;
my $locationServer="http://banners.adultfriendfinder.com/piclist";
my $locationData = get($locationServer) or die "Could not retrieve data from server";
$locationData =~ /location\\">(.*?)<\/span>/;
print "Your location is: $1\n";
Here’s some sample output:
[bill@ppppowerbook-airport]~$ perl findme.pl
Your location is College Station, Texas
And for a colo box up north:
[bill@aggienerds]~$ perl findme.pl
Your location is Dallas, Texas