As you know, the user's IP is $_SERVER['REMOTE_ADDR']. That's it. But in some situations a server may be behind a proxy (often a load balancer), then IP will be in $_SERVER['HTTP_X_FORWARDED_FOR']. Also it's recommended to store both values.
Ok I've two related questions:
- REMOTE_ADDRis containing what when this- HTTP_X_FORWARDED_FORisn't empty?
- What are these things(based on this answer) ? Might they be containing the IP? If yes then in that case - REMOTE_ADDRand- HTTP_X_FORWARDED_FORare containing what?- HTTP_CLIENT_IP
- HTTP_X_FORWARDED
- HTTP_FORWARDED_FOR
- HTTP_FORWARDED
 
 
    