I am trying to get the clients username from server which in on the intranet. Im using mozilla firefox and chrome only. I am able to get the information like Client PC Name and Client Pc IP. How can i get the username for the client who access the website on intranet.
The code i am using is below
<?php
$compt = gethostbyaddr($_SERVER['REMOTE_ADDR']);
// i get complete pc name like example: abbc123.abc.google.com
$compt_name = $issued_for = strtok($compt,'.');
//i get the pc name abbc123
echo $compt_name;
?>
how can i use the computer name to get the username? i have tried searching but cant find anything that will work. im using PHP and all answers i get is for c# , Vb etc. The server is running windows server 2012