PHP get real IP (proxy detection)

后端 未结 2 1208
我在风中等你
我在风中等你 2020-12-28 23:20

I do get track the \"real\" IP of an user, if he has an proxy wich sends the header of the real IP... does any of have a better solution, or even more headers?

Sinc

2条回答
  •  庸人自扰
    2020-12-29 00:17

    If the proxy sends a header then you can fetch the original IP of the client. If the proxy doesn't, then you can't. Unfortunately (Or maybe fortunately depending on your perspective) it's as simple as that.

    What I did at our intranet, is redirect "intranet.mydomain.com" to "intranet" on the webserver, the latter doesn't use the proxy due to out internal network/DNS configuration ... Don't know what you want to do, but this may be useful.

    You can also set an exclude list in the browser...

提交回复
热议问题