Hi there!
I am using this code to get the users IP, it also allows you
to retrieve the IP of AOL users.
Btw, the @ before $_SERVER["HTTP_X_FORWARD_FOR"]
prevents an error message, if the user is not using AOL...
Oh, I almost forgot: The $ip variable is an integer (I did this for
efficiently storing the IP in an MySQL database).

    // Get user's IP and user agent
    $ip = ip2long(($tmp = @$_SERVER["HTTP_X_FORWARD_FOR"]) ? $tmp :
$_SERVER["REMOTE_ADDR"]);

Hope it helps,

--
Christian Blichmann

_____________________________________________
don't hesitate - email me with your thoughts:
e-mail: [EMAIL PROTECTED]
 - please remove the ".nospam" from address.
_____________________________________________
do you want to know more?
web:    http://www.blichmann.de



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

Reply via email to