Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Get actual IP over NAT

by xgunnerx (Initiate)
on May 22, 2002 at 13:53 UTC ( #168420=snippet: print w/replies, xml ) Need Help??
Description: Gets your actual IP address on a NAT system via whatismyip.com
#!/usr/bin/perl
use strict;
use LWP::Simple;

my @content = get("http://www.whatismyip.com/");

foreach (@content) {
    chomp;
    print "$1\n" and last if /<TITLE>Your\sip\sis\s(.*)\sWhatIsMyIP.co
+m<\/TITLE>/;
}
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: snippet [id://168420]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2022-07-02 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (102 votes). Check out past polls.

    Notices?