如何获取网站运行计算机的唯一ID
我尝试使用此代码获取 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不可以。您无法获取访问您网站的人的 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.
要从用户的计算机获取此信息,您需要在用户的计算机上使用 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.
计算机没有唯一的 ID。你正在寻找不存在的东西。
Computers do not have unique IDs. You are looking for something that does not exist.