如何获取网站运行计算机的唯一ID

发布于 2025-01-01 10:14:24 字数 324 浏览 3 评论 0原文

我尝试使用此代码获取 MAC ID,但我只获取主机服务器地址,有什么方法可以获取用户访问我的网站的计算机的唯一 ID。

ob_start(); 
system('ipconfig /all'); 
$mycom=ob_get_contents(); 
ob_clean(); 
$findme = "Physical";
$pmac = strpos($mycom, $findme); 
$mac=substr($mycom,($pmac+36),17); 
echo $mac;

实际上我需要知道是否可以根据电脑内除 IP 之外的特定内容来限制对特定网站的访问?

I tried this code for getting the MAC ID , but i get only the host server address, is ther any way to get the unique ID of the computer which the user accessing my website.

ob_start(); 
system('ipconfig /all'); 
$mycom=ob_get_contents(); 
ob_clean(); 
$findme = "Physical";
$pmac = strpos($mycom, $findme); 
$mac=substr($mycom,($pmac+36),17); 
echo $mac;

Actually i need to know that is it possible to limit access to a particular website based on something specific within a pc other than IP?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夜司空 2025-01-08 10:14:24

不可以。您无法获取访问您网站的人的 MAC 地址,因为您的 Web 服务器不使用 MAC 地址,而是使用 IP,因此它不会接收该信息。

No. You cannot get the MAC address of someone accessing your website, because your web server does not work with MAC addresses, it works with IPs, and thus it doesn't receive that information.

染年凉城似染瑾 2025-01-08 10:14:24

要从用户的计算机获取此信息,您需要在用户的计算机上使用 ActiveX 或 Java 运行控件或小部件。

To get this information from the user's computer, you need to run a control or a widget using ActiveX or Java on the user's computer.

倾城月光淡如水﹏ 2025-01-08 10:14:24

计算机没有唯一的 ID。你正在寻找不存在的东西。

Computers do not have unique IDs. You are looking for something that does not exist.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文