i coded some vb.net application, for security i use HWID security method...
vb.net code to generate unique key is:
Dim hwid As String = System.Security.Principal.WindowsIdentity.GetCurrent.User.Value
it will return some unique key for every pc like this
S-1-2324-34242FDF-SDWQ3Q-Q3WR4CWRWCE1321SXS32
currently i am learning & developing PHP scripts...
i want to know it is possible to generate the same unique key using PHP???
Let's break it down.
Is a method that returns the current user.
Is actually calling:
The method is actually:
This is simply the User's Security Identifier (SID).
Running
wmic useraccount get name,sid
returns all the SIDs found on the machine.Now, what does this mean for PHP? Well since PHP is ran on the server only, I doubt this number will change based on which visitor visits. So using this number in PHP is pointless, as it will always be the same.
A better approach for generating a random ID is
uniqid
.Check out this for information on how this SID is derived from the registry.