Gossamer Forum
Home : General : Perl Programming :

ip address advice needed.

Quote Reply
ip address advice needed.
i need some advice.
does $ENV{'REMOTE_ADDR'} always return a value?
I mean, I want to use it in my session table to increase security, but I aint too sure about this.
Also what happens if a local network uses one pc for their Internet? That would mean they have the same IP. Is there anyway to distinguish between them?

thanks
Pedge
Quote Reply
Re: [pedge] ip address advice needed. In reply to
Hi Pedge,

As far as I know, it is always available (unless going through anon-proxies etc).

You should be about to get around it with something like;

Code:
my $remove_addr = $ENV{'REMOTE_ADDR'} || 'not found';

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] ip address advice needed. In reply to
It is always defined even if using a proxy though you'll see the proxy address.