使用 PHP 进行 IP 过滤
我一直在寻找一种创建 IP 过滤器的方法,以便我可以轻松识别客户,但我看到的许多示例在某种程度上我无法理解。
然后我带着一些问题来到这里 客户进入我的网站,IP x 从 $_SERVER ['REMOTE_ADDR']
恢复,但我一直在阅读一些有关 CRID 的内容,这是检查此 IP 是否在拒绝列表中的一种方法,因为显然90%的客户访问网站时,重启调制解调器时IP就改变了,我不知道我是不是在胡说八道,但是创建一个IP过滤器是个好主意吗?
I was looking for a way to create an IP filter, so that I could easily identify customers, but many examples I saw, I could not understand in a way.
Then, I come here with some questions
A customer enters my site, IP x recovered from $_SERVER ['REMOTE_ADDR']
, but I've been reading some things about CRID, which is one way to check if this IP is on the list denied, because obviously 90% of customers accessing the site, when you restart the modem IP is changed, I do not know if I'm talking nonsense, but a good idea to create an IP filter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该结合多个因素,例如会话、cookie 和 IP 过滤器。
但当然用户仍然可以清除 cookie 和会话。
您可能会尝试获取用户电脑或计算机的 mac-id,但它很复杂,不知道它是否有用,而且用户仍然可以更改 mac-id,但这不是一件容易的事情。
You should combine multiple factors such as sessions, cookies and ip filters.
But of course users still be able to clear cookies and sessions.
You may try to get mac-id of user's pc or computer but it is complicated and dunno it is useful or not and also user still can change mac-id but it's not an easy thing to do.