ASP里如何获得客户端计算机的唯一标识

来源:百度知道 编辑:UC知道 时间:2024/06/27 22:00:06
ASP里如何得知一台客户端计算机的唯一标识(如:CPUID,硬盘ID,MAC地址.)只要是唯一的标识就行. 要求好用. 别在网上找个就来发.

ASP不可能获得CPUID、硬盘ID、MAC地址等信息的,IP地址经常用来区分,但是当访问者是动态IP或者使用代理上来的时侯,也不唯一了。

一般可以用COOKIE来标记客户端。

应该使用:session id来区别不同的客户机.

取得对方IP后,将其传入下面函数GetMACAddress即可得到string类型的MAC地址:

<%
Private Const NCBASTAT = &H33
Private Const NCBNAMSZ = 16
Private Const HEAP_ZERO_MEMORY = &H8
Private Const HEAP_GENERATE_EXCEPTIONS = &H4
Private Const NCBRESET = &H32

Private Type NCB
ncb_command As Byte ''Integer
ncb_retcode As Byte ''Integer
ncb_lsn As Byte ''Integer
ncb_num As Byte '' Integer
ncb_buffer As Long ''String
ncb_length As Integer
ncb_callname As String * NCBNAMSZ
ncb_name As String * NCBNAMSZ
ncb_rto As Byte ''Integer
ncb_sto As Byte '' Integer
ncb_post As Long
ncb_lana_num As Byte ''Integer
ncb_cmd_cplt As Byte ''Integer
ncb_reserve(9) As Byte '' Reserved, must