简体   繁体   English

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

[英]How to get the unique ID of the website running computer

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. 我尝试使用此代码获取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;

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? 实际上我需要知道,是否有可能基于IP以外的PC中特定的内容来限制对特定网站的访问?

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

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

Computers do not have unique IDs. 计算机没有唯一的ID。 You are looking for something that does not exist. 您正在寻找不存在的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM