Getting and storing user IP address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been having some trouble with creating a way to store an IP address of a site visitor for tracking users site visits. 
So far I have heard using:

$ip = $_SERVER['REMOTE_ADDR']?:($_SERVER['HTTP_X_FORWARDED_FOR']?:$_SERVER['HTTP_CLIENT_IP']);

Would you consider this the best way? 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux