"; try{ require_once ("config.php"); function __autoload($className){ require_once ("api/$className.php"); } global $settings; $ldap = new LDAP($settings['ldap.url'], $settings['ldap.base']); $ldap->bind($settings['ldap.userdn'], $settings['ldap.passwd']); $result = $ldap->find(); foreach($result as $dn => $entry){ // Pour chaque entrée echo "dn: $dn\n"; foreach($entry as $attr => $values){ // pour chaque attribut foreach($values as $value){// pour chaque valeur echo "$attr: $value\n"; } } echo "\n"; } }catch(Exception $e){ echo $e->getMessage()."\n".$e->getTraceAsString(); } echo ""; ?>