Reputation: 21
I have already used following php script in remote server application but got null value ::
exec('wmic COMPUTERSYSTEM Get UserName', $user);
$pc_user = (explode('\\',$user[1]));
$download_location = "c:/users/$pc_user[1]/downloads/";
Result :: Array()
But in local pc I got the pc user name properly.
Upvotes: 0
Views: 4624
Reputation: 719
You can get following thorough PHP scripts
$_SERVER['REMOTE_ADDR']; // Returns the IP address of client
$_SERVER['RREMOTE_HOST']; // Returns the Host name of client
$_SERVER['REMOTE_PORT']; // Returns the port being used to communicate
Upvotes: 1