Hi I am using the code below to retrieve client username on my website but it only works for me on localhost, other people connected remotely to the file its just finding nothing with no errors or anything.
exec("wmic /node:$_SERVER[REMOTE_ADDR] COMPUTERSYSTEM Get UserName", $user);
echo($user[1]);
What is the problem ?