Saturday, July 12, 2008

determining your visible IP address using perl and whatipmyip.com

A while back Ashish Shukla put together
a great hack for using perl an whatismyip.com to determine your IP address. My modified version of this is below:
#!/usr/bin/perl -w
#whatismyip.pl - This script uses http://www.whatismyip.com/ service.

use LWP::Simple;
use strict;

my $url = "http://www.whatismyip.com/automation/n09230945.asp";

my $content = get($url);
print "$content\n";

No comments: