How to get Active Directory details of a user in Php?

Yes you read it right! Active Directory details can be also got from Php by using a small piece of code but first to get the details you need your Php script to be hosted on IIS with Php enabled and not run Php scripts on Apache

The below piece of Php code helps you to get the details of the user who is currently visiting the page from IIS


 $user = $_SERVER['AUTH_USER']; 


Scroll to Top