Original address: Http://hi.baidu.com/lllangxx/item/3ccb7cdfa13b56eb3dc2cb39
First, learn how to manage active Directory
Active Directory Progressive Series Guide
Second, Adexplorer
To download a adexplorer online, which is an Active Directory browser, allows us to more clearly understand how and how data is stored in Active Directory.
Third, domain access to active Directory
Ensure that the DNS parser for the domain-based computer is configured to use the same DNS name server as Active Directory, and in most cases, assuming that you are using Active Directory-integrated DNS, we set this domain-foreign computer's DNS setting to this Activ E directory server IP address.
For more information, please refer to "Performing Linux client authentication using Active Directory"
Iv. PHP Code
For ease of use, I use ADLDAP for programming, which can be a lot easier.
<?PHPrequire_once(dirname(__file__) . '/adldap.php '); $options=Array();Try { $options[' Account_suffix ']= "@mydomain. com"; $options[' Base_dn ']= "ou=accounts,dc=mydomain,dc=com";// $options[' Domain_controllers ']=Array("mydomain.com"); $options[' Ad_username ']= "Administrator"; $options[' Ad_password ']= "123456"; $ldap=NewADLDAP ($options);}Catch(adldapexception$e) { Echo $e;Exit(); }//Var_dump ($LDAP); Echo("<pre>\n");$result=$ldap->authenticate ("Qiujiayu", "Qiujiayu");Var_dump($result);Echo("----------------------------------------------------");$result=$ldap->folder_list (Array(' Marketing '), Adldap_folder,true, ' Contact ');Var_dump($result); Echo("----------------------------------------------------"); $result=$ldap-all_users ();Var_dump($result); Echo("----------------------------------------------------"); $result=$ldap-all_contacts ();Var_dump($result); Echo(Json_encode ($ldap->contact_info ($result[0],Array(' telephonenumber ')))));Echo("----------------------------------------------------");?>