Php – How to get a unique PC ID from a web browser


I have a web app that will be running n several specific target machines. I could have the user select which machine he is on when he logs in, but that is prone to error. Is there a way I can get some unique ID from each PC, store those in a database on my server and then when someone logs in from a particular machine, identify that machine? I thought of IP address but those might change as well due to the nature of our deployment. But is is critical that I know which machine the system is running on.

Note: I am not trying to determine the machine code of a web user's machine as that would be a privacy violation. I KNOW my machines so I was wanting to tie them to the database somehow. This also acts as security for me as I can reject logins from unknown machines.

Thanks for any ideas. I am running Apache with Code Igniter 3 and Centos 6.5

Best Solution

It's not possible without a client component, browser plugin or something similar. The closest alternatives are:

  • using cookies;
  • using client certificates;
  • using browser fingerprinting;

each with their own disadvantages.