Re: [PHP] logging ip address when submitting a form

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Not true- $_SERVER['REMOTE_ADDR'] doesn't rely on anything sent by the browser. Load up a phpinfo() on your server, then request it by hand... echo -e "GET /phpinfo.php HTTP/1.0\r\n\r\n" | nc www.yourserver.com 80 You'll see it has your IP address e

RE: [PHP] logging ip address when submitting a form

2003-03-27 Thread Chris Shiflett
--- daniel <[EMAIL PROTECTED]> wrote: > this is a major problem , $_SERVER['HTTP_X_FORWARDED_FOR'] should get the ip > being the isp proxy , but some proxies including the stupid windoze one we > have at work will hide the ips behind it, so its rendered useless Your Windows proxy is not misbehav

RE: [PHP] logging ip address when submitting a form

2003-03-27 Thread daniel
this is a major problem , $_SERVER['HTTP_X_FORWARDED_FOR'] should get the ip being the isp proxy , but some proxies including the stupid windoze one we have at work will hide the ips behind it, so its rendered useless >= Original Message From Justin French <[EMAIL PROTECTED]> = >$_SERVER

Re: [PHP] logging ip address when submitting a form

2003-03-27 Thread Justin French
$_SERVER['REMOTE_ADDR'] will contain the remote user's IP address IF it is set by the user agent (browser). It's also worth noting that this IP address could be faked, could be rotated by their ISP on a request-by-request basis (eg all AOL users), could be that of their firewall or network gateway

Re: [PHP] logging ip address when submitting a form

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You might wanna move ipaddr.log outside your server root... or at least use some .htaccess... wouldn't want someone to just browse to the file... $fp = fopen("ipaddr.log", "a+"); fputs($fp, $_SERVER['REMOTE_ADDR']."\n"); fclose($fp); On Thursday 2

Re: [PHP] logging ip address when submitting a form

2003-03-27 Thread Philip J. Newman
$HTTP_X_FORWARDED_FOR phpinfo(); Check that its in your PHP Info. $REMOTE_ADDR will return the Remote Address. I use This small loop. if (!$HTTP_X_FORWARDED_FOR) { $HTTP_X_FORWARDED_FOR=$REMOTE_ADDR; } / Phil - Original Message - From: "Joakim Larsson" <[EMAIL PROTECTED]> To: <[EMAIL