i can get the windows username in my system but i need to retrieve the windows username from **visitors**.
访问者的意思不是互联网我说的是内部网。
我正在为此开发内部网网站:
代码下方供您参考: -
/* to get the windows username */
$nw = new COM("WScript.Network");
print "username: " . $nw->username . "<br><br>";
$computername = $nw->computername;
print "computername: $computername<br>";
$owmi = new COM("winmgmts:\\\\$computername\\root\\cimv2");
$comp = $owmi->get("win32_computersystem.name='$computername'" );
print "username: " . $comp->username; echo "<br>";
/* to get the windows username */