#!/usr/bin/perl

$ip = $ARGV[0];
$result = `wget -q --output-document=- http:\/\/www.iplocation.net\/tools\/ip-locator.php?query=$ip | grep Longitude `;
$result =~ /^.*td>([0-9]*[0-9]*[0-9]\.[0-9][0-9]*)<.td.*td>([\-]*[0-9]*[0-9]*[0-9]\.[0-9][0-9]*)<.td.*/;
print "$1 $2\n";

