-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
--- 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
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
$_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
-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
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
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
7 matches
Mail list logo