Is $ _SERVER ['REMOTE_ADDR'] really trustworthy?

Possible duplicate:
What is the most accurate way to get the correct user IP address in PHP?
Is $ _SERVER ['REMOTE_ADDR'] always isset ()?

Well, I would like to know if $_SERVER['REMOTE_ADDR'] always contains the http request transmitter IP? It doesnโ€™t matter if it is a proxy server, vpn or a real client IP address, does this var always contain a valid IP address or is it somehow changed by the client?

+4
source share
1 answer

It will always contain the IP address from which the request was sent, in accordance with the server receiving the request.

Value: if the request comes from the computer behind the firewall / NAT / proxy, then this will be the contents of the firewall / NAT / proxy.

+3
source

All Articles