在Web应用程序中获取客户端的唯一cpuid(通过唯一ID识别客户) [英] obtaining unique cpuid of client in web app (recognize customer by unique id)

查看:140
本文介绍了在Web应用程序中获取客户端的唯一cpuid(通过唯一ID识别客户)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
我想通过唯一的ID来识别我的网站的访问者,直到用户无法通过计算机注册两次(计算机对于没有用户来说很重要).但是如果我保存他们的IP,当他们断开连接并再次连接到Internet时,它不是恒定的,我也不想使用cookie,因为用户可以删除它.我知道单词中的每台计算机都有唯一的CPU ID,但我不知道如何实现此ID,以及如何将其存储在Web应用程序中;

hi
i wanna recognize visitor of my site by unique id until a user cant register twice by a computer( a computer is important no user) . but if i save their ip it is not constant when they disconnect and connect again to the internet also i dont want to use cookie because user can delete it. i know that every computer in the word has a unique cpu id but i dont know how can i achieve to this id and how can i store it in web application ;

推荐答案

出于安全原因,我不太喜欢Activex控件(必须明确允许浏览器执行脚本),但这应该可以工作:

I don''t really like activex controls for security reasons (you have to explicit allow your browser to execute scripts) but this should work:

<script type="text/javascript">
    var cpu_id = "";
    var get_cpuid = GetObject("winmgmts:{impersonationLevel=impersonate}");
    e = new Enumerator(get_cpuid.InstancesOf("Win32_Processor"));
    for(; !e.atEnd(); e.moveNext()) {
        var s = e.item();
        cpu_id = s.ProcessorID;
    }
</script>



使用:



using:

<b>Client CPU-ID : </b><span id="show_cpu_id" />
<script type="text/javascript">
    document.getElementById("show_cpu_id").innerHTML = cpu_id;
</script>


也许您为每个与IP地址结合在一起的用户生成一个唯一的ID?
我认为它不能与ASP一起使用,这将是对用户系统的更深层次的干预.
在桌面应用程序中获取ID确实很简单,但是可以使用silverlight或Web上的ActiveX应用程序类型来完成.
Maybe you generate a unique id for each user which is coupled with the ip adress?
I think it''s not working with ASP, that would be a deeper intervention in the users system.
It''s really simple to get the id in desktop applications but it could be done with silverlight or type of ActiveX application for web.


如果您能找到使用ip n find的方法使用arp/rarp的pc的mac地址,然后解决了ur prb.
If u could find a way to use ip n find mac address of tht pc using arp/rarp then ur prb is solved.


这篇关于在Web应用程序中获取客户端的唯一cpuid(通过唯一ID识别客户)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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