Authenticate against ldap using PHP, active directory, while using IE/Firefox
问题 This code below checks for the user's credentials against ldap <?php $ldaphost = "ldap.domain.com"; $ldapport = 389; $ds = ldap_connect($ldaphost, $ldapport) or die("Could not connect to $ldaphost"); if ($ds) { $username = "johndoe@domain.com"; $upasswd = "pass"; $ldapbind = ldap_bind($ds, $username, $upasswd); if ($ldapbind) {print "Congratulations! $username is authenticated.";} else {print "Access Denied!";} } ?> My users use Firefox and IE, and I know that can pass their ActiveDirectory