Re: Capturing user login Information of windows
- From: "Csaba Gabor" <danswer@xxxxxxxxx>
- Date: 21 Jul 2006 04:43:43 -0700
sachu wrote:
Hi Everyone,
I want develop the intranet site with seamless authentication. Is there
any way to capture only the user name who has logged in the windows
machine.
Iam using PHP 5.0 MySQL and IIS Server.
I have tried with $_SERVER['LOGON_USER'] but its returning nothing.
Please help me out.
This works for me under WinXP / Apache 2 (note that $nw->username is
not useful in this sense):
$nw = new COM("WScript.Network");
print "username0: " . $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;
Csaba Gabor from Vienna
.
- Follow-Ups:
- Re: Capturing user login Information of windows
- From: sachu
- Re: Capturing user login Information of windows
- References:
- Capturing user login Information of windows
- From: sachu
- Capturing user login Information of windows
- Prev by Date: Home based Internet research Jobs
- Next by Date: Re: Capturing user login Information of windows
- Previous by thread: Capturing user login Information of windows
- Next by thread: Re: Capturing user login Information of windows
- Index(es):
Relevant Pages
|