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
ROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 28, 2003 6:04 AM Subject: [PHP] logging ip address when submitting a form > Hello, > > Is there a command in php that would logg the ip address of the user viewing > the php file. > I need someway of finding out who posted

[PHP] logging ip address when submitting a form

2003-03-27 Thread Joakim Larsson
Hello, Is there a command in php that would logg the ip address of the user viewing the php file. I need someway of finding out who posted the form. thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php