我需要找出一种方法,唯一地识别每台计算机访问我正在创建的网站。有人有什么建议吗?
因为我想解决方案工作在所有机器和所有浏览器(在合理的范围内),我试图使用javascript创建一个解决方案。
饼干可不行。
我需要基本上创建一个guid的能力,这是唯一的计算机和可重复的,假设没有硬件变化发生在计算机上。我正在考虑的方向是获得网卡的MAC和这种性质的其他信息,这将id访问网站的机器。
我需要找出一种方法,唯一地识别每台计算机访问我正在创建的网站。有人有什么建议吗?
因为我想解决方案工作在所有机器和所有浏览器(在合理的范围内),我试图使用javascript创建一个解决方案。
饼干可不行。
我需要基本上创建一个guid的能力,这是唯一的计算机和可重复的,假设没有硬件变化发生在计算机上。我正在考虑的方向是获得网卡的MAC和这种性质的其他信息,这将id访问网站的机器。
当前回答
你可能想尝试在evercookie中设置一个唯一的ID(它可以跨浏览器工作,见他们的常见问题): http://samy.pl/evercookie/
还有一家叫做ThreatMetrix的公司,被很多大公司用来解决这个问题: http://threatmetrix.com/our-solutions/solutions-by-product/trustdefender-id/ 它们相当昂贵,而且他们的其他一些产品也不太好,但他们的设备id运行良好。
最后,还有这个开源jquery实现的panopticlick的想法: https://github.com/carlo/jquery-browser-fingerprint 它现在看起来很不成熟,但可以扩展。
希望能有所帮助!
其他回答
您可以使用fingerprintjs2
new Fingerprint2().get(function(result, components) {
console.log(result) // a hash, representing your device fingerprint
console.log(components) // an array of FP components
//submit hash and JSON object to the server
})
在此之后,您可以根据现有用户检查所有用户并检查JSON相似性,因此即使他们的指纹发生了突变,您仍然可以跟踪他们
我觉得饼干可能就是你要找的东西;这是大多数网站唯一识别访问者的方式。
通过HTTP连接只能获得少量信息。
IP - But as others have said, this is not fixed for many, if not most Internet users due to their ISP's dynamic allocation policies. Useragent String - Nearly all browsers send what kind of browser they are with every request. However, this can be set by the user in many browsers today. Collection of request fields - There are other fields sent with each request, such as supported encodings, etc. These, if used in the aggregate can help to ID a user's machine, but again are browser dependent and can be changed. Cookies - Setting a cookie is another way to identify a machine, or more specifically a browser on a machine, but as others have said, these can be deleted, or turned off by the users, and are only applicable on a browser, not a machine.
So, the correct response is that you cannot achieve what you would live via the HTTP over IP protocols alone. However, using a combination of cookies, as well as IP, and the fields in the HTTP request, you have a good chance at guessing, sort of, what machine it is. Users tend to use only one browser, and often from one machine, so this may be fairly relieable, but this will vary depending on the audience...techies are more likely to mess with this stuff, and use more machines/browsers. Additionally, this could even be coupled with some attempt to geo-locate the IP, and use that data as well. But in any case, there is no solution that will be correct all of the time.
我的文章可能不是一个解决方案,但我可以提供一个例子,这个功能已经实现。
如果你第一次在电脑上访问www.supertorrents.org的注册页面,没问题。但如果您刷新页面或再次打开页面,它会识别出您之前访问过该页面。真正的美妙之处在于——即使你重新安装Windows或其他操作系统,它也能识别出来。
我在某处读到,他们存储CPU ID。虽然我不知道他们是怎么做到的,但我非常怀疑,他们可能使用MAC地址来做到这一点。
如果我知道怎么做,我一定会分享的。
如果没有用户的合作,识别访问网站的电脑是不可能的。但是,如果他们允许,您可以存储一个cookie,以便在机器再次访问您的网站时识别它。关键在于,访问者是可控的;他们可以删除cookie,并随时以新访客的身份出现。