I'm working on an intranet web application in PHP. Im trying to use Windows NT login credentials to logon to the application. The trouble im having here is how do i get the remote users windows username? I want to obtain the username and then check against various LDAP groups so that I can direct them to appropriate pages in my application.
I've so far tried
<?php
echo $_SERVER['REMOTE_USER'];
echo $_SERVER['PHP_AUTH_USER'];
?>
Both of them return empty values.
UPDATE: Using $_SERVER['REMOTE_ADDR'] Im able to get the IP address of the computer. Is there anyway I could get userid/username (anything unique) and use it to compare against LDAP groups? I would want to do this, when they enter the main page of the website and store a session and then use the session variable throughout the website.