Hi, not sure about the REMOTE_ADDR, I've never had any problems with it. To get an IP from a URI try this:
use Socket; $referral_address = $ENV{'HTTP_REFERER'}; $referral_address =~ m#^.*http://([^/]+)/.*$#; $IP = inet_ntoa inet_aton $1; If you want the IP address in hex, just use inet_aton. R At 11:06 03/10/2002 +0100, Mike Craig wrote: >Hi all, > Can you help me with this? > > I want to get the servers IP address and the IP address of the > referrer. Is >there a reliable way to do this? When I used 'REMOTE_ADDR' I get different >values even when I go directly to my site and then call 'REMOTE_ADDR'. Does >anyone know why? I want to use the IP address to ensure that some of the >code is only called from my site or from a valid IP address. I want the IP >address and not the URL so I can convert it into Hex. > >$ENV{'SERVER_NAME'}; >$ENV{'HTTP_REFERER'}; >$ENV{'REMOTE_ADDR'}; > > > In the discussions on cookies does any one know why when I set a > cookie and >restart some time later my cookies are lost when I do the following in >JavaScript > >var cookieDate = new Date() >cookieDate.setTime(cookieDate.getTime() + 10 * 365 * 24 * 3600 * 1000);//Add >10 years > >document.cookie = escape("MyCookie=XXX" + ";expires=" + >cookieDate.toGMTString() + ";domain=.UltraTextPro.biz"); > >Mike > > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]