如何检测访问者的实际IP地址 [英] How to detect the actual IP address of visitors

查看:212
本文介绍了如何检测访问者的实际IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用REMOTE_ADDR来检测PHP中访问者的IP地址。但即使他试图隐藏它们,我怎么能检测到访客IP地址。我也使用了HTTP_X_FORWARDED_FOR和HTTP_CLIENT_IP。但我只是无法正确实现它们。

I have used the "REMOTE_ADDR" to detect the ip address of the visitors in PHP. But how could i detect the visitors ip address even if he is trying to hide them. I have used "HTTP_X_FORWARDED_FOR" and "HTTP_CLIENT_IP" too. But I am just not able to implement them correctly.

推荐答案

这本质上是不可能的。另一端可以设置他们的计算机完全骗你。有些东西可以让你更频繁地得到正确的答案,但即使它们也很容易出现。无论你想做什么都需要这个,我认为你需要认真重新考虑你的目标和设计。

It's pretty inherently impossible. The other end could just set up their computer to lie to you entirely. There are things that will get you correct answers more often, but even they're pretty easy to get around. Whatever you're trying to make that requires this, I think you need to seriously reconsider your objectives and design.

这篇关于如何检测访问者的实际IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆