Is it possible to get the IP address for NAT in PHP? I use $_SERVER["REMOTE_ADDR"]to get the client IP address. This does not give the exact IP address of the client that is behind NAT.
$_SERVER["REMOTE_ADDR"]
No, It is Immpossible. NAT means "Network Address Translation" - the IP address of the packets is rewritten on the NAT device, so the public IP address is the only one known to your server.
However, you can use some tricks - for example, checking the internal IP address using a Java applet. See this: Get the correct local IP address from a java applet
IP- NAT, HTTP php.
. PHP IP.
'REMOTE_ADDR' IP-, .
if they use a proxy you can use
$real_ip = $_SERVER['HTTP_X_FORWARDED_FOR']
otherwise it is impossible
You cannot see the private address of the client, and usually you do not need to see that this is so, you cannot access it. Even if he used a proxy server, sometimes you can get the address:
$_SERVER['HTTP_X_FORWARDED_FOR']