Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EASIEST Way To Grap IP Address

Status
Not open for further replies.

mtorbin

Technical User
Nov 5, 2002
369
US
Hey all,

I've tried looking up information on ifconfig, but for some reason I can't find a darn thing. Any ideas? All I want to do is quickly grab the IP Address.

- MT
 
BTW, it has to be an INTERNAL ip address, not EXTERNAL.

- MT
 
Can this not be done with JavaScript?

- MT
 
Linux. OK... I found a way to do this in JS, however, it requires SHTML files, more commonly known as SSI. Can I stick this same code in a CGI file and have it parsed or is it ONLY SHTML?

- MT
 
$ENV{'REMOTE_ADDR'} should give you the IP address of the client if that's what you're looking for.

On an internal network it's fairly straightforward, externally the $ENV{'REMOTE_ADDR'} can be spoofed

HTH
--Paul

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top