good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: What is my IP address?by zengargoyle (Deacon) |
on Apr 25, 2003 at 10:25 UTC ( [id://253127]=note: print w/replies, xml ) | Need Help?? |
just some more to think about... see checking my default gateway. if you can find a default gateway/netmask then the local IP on the same network would be a good choice. just don't forget to add an option or configuration setting to specify the correct IP if your searching doesn't pick the address the user would like to use. if you're checking for net connectivity you could just create a socket and bind it to a foreign address (www.perlmonks.com for instance) and get the local address from the socket. (i think that might work)
In Section
Seekers of Perl Wisdom
|
|