浏览器如何保护用户的IP地址? [英] do browsers protect users IP address?

查看:158
本文介绍了浏览器如何保护用户的IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用PHP编写代码,我想检测客户端的IP地址. 我一直在使用$ _SERVER ['REMOTE_ADDR'].

I am writing code in PHP, and I would like to detect the client's IP address. I have been using $_SERVER['REMOTE_ADDR'].

它通常可以工作...但是有时我得到的地址是127.255.255.255,这时显然是使用常规Internet连接的用户试图连接该网站.有什么理由吗?

It works usually... But sometimes I get the address 127.255.255.255, when clearly a user which was on a regular internet connection tried to connect the website. Is there a reason for that?

推荐答案

127.255.255.255是您内部服务器的广播(环回)

127.255.255.255 is a broadcast from you internal server (loopback)

如果确定自己是外部用户,则应在您的网站上检查代码注入的可能性

If your sure it's an external user, you should check for code injection possibilities on your site.

这篇关于浏览器如何保护用户的IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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