Lester Caine wrote:

Jack Gates wrote:

I replaced this:
$address = getenv("REMOTE_ADDR");

with this

$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
and now I am getting exactly what I was trying to get.


This will work fine for networks that provide their own 'REMOTE_ADDR', but once proxies are in the way, you will see a proxy address rather than the real machine.

very true. Some 'nice' proxies will oblige by sending an X-Forwarded-For header .


--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to