Dan Shirah wrote:
I looked on PHP.net but I couldn't not find anything suitable to answer my question. Within PHP, is there a way to pull the name of the user that is currently logged into the PC? I know with some of the _SERVER functions you can pull the IP of the machine and other data, is there a function within this family that would work?
I'm assuming you're after "transparent authentication" where the user doesn't need to do anything to authenticate with the site. This is only possible with IE as the client on an NT domain with the server on the same domain. If you're using IIS on the server then it's as easy as removing anonymous and basic authentication from the site/directory. If you're using Apache or something else you need to find an extension/module that provides NTLM authentication, but not all of the ones I tried fully supported the transparent side of it.
I implemented this for a corporate intranet a while back in Apache on FreeBSD with mod_ntlm (Google for it - dunno if it's still maintained). That was in 2004 and information was sparse, but with a bit of research and *lots* of experimenting I was able to get it to work.
To be perfectly honest, if I were doing it again I'd save the time and use IIS on the server - sooo much easier.
-Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php