Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding out authenticated users username on iis server 1

  • Thread starter Thread starter member 141630
  • Start date Start date
Status
Not open for further replies.
M

member 141630

Guest
Hi,
Am using Win2003/IIS6.0/PHP4.3 on my extranet server
When users connect they use BASIC authentication to gain access to the site using Microsoft domain authentication that is part of IIS.
Is there any way by use of PHP to identify the username of the client, so for example when filling in a form the username can be identified?
I know this can be done in ASP but PHP is MUCH nicer!

Rgds

Phil B
 
Look at the ouput of the $_SERVER superglobal array and see if the username is in there. I have no idea what IIS sticks in there, so go explore:
Code:
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
 
auth_user was the system variable I was looking for - works great!
Authentication by IIS and PHP can pull the value of the logged in user! Brilliant!

Many Thanks!

Phil B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top