Re: Re: Obtain NT Logon
| From: | Harlequin | Date: | Sun, 04 Jul 2004 12:38:52 +0000 |
| Subject: | Re: Re: Obtain NT Logon | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189664@lists.php.net to get a copy of this message | ||
Martin John is right.
I have used this facility with VB, VBA and VBS but not in PHP. However, the
principle is the same. Disable anonymous logins and use the code John is
suggesting and it should work a treat.
I'd recommend outputting this data to a TXT file or MySQL dbase also.
--
-----------------------------
Michael Mason
Arras People
www.arraspeople.co.uk
-----------------------------
"John W. Holmes" <holmes072000@charter.net> wrote in message
news:40E7525C.9080500@charter.net...
> Manuel Lemos wrote:
>
> >> I have a web form with a field for username, this is a corporate site
> >> so will be the users NT logon. Would it be possible using PHP to obtain
> >> this information directly from the client pc?
> >
> > Assuming that you Web server is configured to require Windows NT domain
> > authentication for serving that PHP script, I suppose you can get the
> > user with GetEnv("LOGON_USER") .
>
> It's available directly in $_SESSION['LOGON_USER'], also. Like Manuel
> said, though, you have to turn off anonymous browsing in (assuming) IIS
> and enable NT authentication.
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals www.phparch.com