I'm building a portal system for my company and need someway of grabbing the windows username of the person logged on accessing the portal.

Apache & PHP on Windows.

This is VITAL so any help is MUCH appreciated.

I've tried
echo $_SERVER; - returns IP, not username
echo $_SERVER; - returns nothing
echo $_SERVER; - returns nothing
echo $_ENV; - returns nothing

6 Years
Discussion Span
Last Post by richieking

I believe that this sort of thing is purposely blocked for security reasons. If you search hard enough you may find something that works under IE (using ActiveX) but probably not in any other browser. The simple answer is to have your own login facility. If your intent was to only allow people to login from their own machine, then I think that it will be difficult, if not impossible, to control that with PHP and /or Javascript.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.