I need to reliably get the id of a user from the PC using PHP.
I tried using
gethostbyaddr($_SERVER['REMOTE_ADDR']);
but that returns the network name of the pc, not what they actually logged in with.
I then tried
var WshShell = new ActiveXObject('WScript.Network');
document.form1.item('uid').value = WshShell.UserName;
which returned the value I needed, but has inherent issues:
- browser security
- being able to completely bypass by using browsers other than IE
Is there a way to get the ID that I am just not finding?