Keep It Simple, Stupid | |
PerlMonks |
Public IP Addressby Anonymous Monk |
on Nov 10, 2006 at 23:53 UTC ( [id://583436]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I am wanting a script that will return my public IP address. The script will be running on a Windows machine that is behind a firewall. The best solution I have found uses the following code
Does anyone have any better methods? I can not use gethostbyname(Sys::Hostname::ghname())as it will only return my private network address. The output from $content is as follows
Any ideas on how to sort so that $content is left with only the ip address? Thank you for your time
Back to
Seekers of Perl Wisdom
|
|