Can PHP get the user's intranet IP address from the external network?
Suppose the user connects to the Internet through a device such as routing, can get access to the user's intranet IP through PHP, namely 198.xxx.xxx.xxx such IP. This refers to the external network user access, not to get the server host intranet! IP
------Solution--------------------
There's a function you can try.
else if (@getenv ("Http_x_forwarded_for"))
}
------Solution--------------------
Take a look at the TCP principle and you'll know why.
------Solution--------------------
Generally not (unless the intranet gateway is set to a "Transparent gateway")
But even if you know, what's the point?
You can't access it back from the server!
It's like someone who wants to know where the user's uploaded files are located on the user's machine.
Since you can't access it from outside, what's the use of knowing it?
------Solution--------------------
It's not the only way to get a host.
------Solution--------------------
Independent visitors can only be judged by a cookie
------Solution--------------------
Independent visitors are cookies+ time to judge.
Will generate a cookie locally and then use the P3P.
And then every day from 0 o'clock onwards, recalculate a UV