Файловый менеджер - Редактировать - /var/www/jonas-eriksen.dk/test/index.php
Назад
<?php // using ldap bind $ldap_password = 'jre'; $ldap_username = 'Xaa52buf_'; $ldap_connection = ldap_connect("ldap://ldap.jumpcloud.com") or die("Could not connect to LDAP server."); // connect to ldap server if (FALSE === $ldap_connection){ // Uh-oh, something is wrong... echo 'Unable to connect to the ldap server'; } // We have to set this option for the version of Active Directory we are using. ldap_set_option($ldap_connection, LDAP_OPT_PROTOCOL_VERSION, 3) or die('Unable to set LDAP protocol version'); ldap_set_option($ldap_connection, LDAP_OPT_REFERRALS, 0); // We need this for doing an LDAP search. if (TRUE === ldap_bind($ldap_connection, $ldap_username, $ldap_password)){ //Your domains DN to query $ldap_base_dn = 'uid=auser,ou=Users,o=63cea34ea615cedb642191f1,dc=jumpcloud,dc=com'; //Get standard users and contacts $search_filter = '(|(objectCategory=person)(objectCategory=contact))'; $result = ldap_search($ldap_connection, $ldap_base_dn, $search_filter); }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка