Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Retrieving the REMOTE HOST

by snopal (Pilgrim)
on Jul 08, 2007 at 00:28 UTC ( [id://625474]=note: print w/replies, xml ) Need Help??


in reply to Retrieving the REMOTE HOST

This usually does the trick for me:

my $address = $ENV{X_FORWARDED_FOR} || $ENV{REMOTE_ADDR} || "";

This returns an IP or a zero length string, which tends to be accurate enough for use as a factor in authentication. You can not be assured that the values provided by the web server environment variables are not spoofed, so multi-factoring of your incoming information is useful.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found