echo ""; echo ""; echo ""; require "Net/LDAP2.php"; $config = array ( 'binddn' => 'uid=web,ou=sysaccounts,o=code-lutin,ou=companies,o=libre-entreprise ', 'bindpw' => 'ne6vdAbD', 'basedn' => 'o=libre-entreprise', 'host' => 'ldaps://ldap.libre-entreprise.org', 'port' => '636', ); $ldap = Net_LDAP2::connect($config); if (PEAR::isError($ldap)) { die('Could not connect to LDAP-server: '.$ldap->getMessage()); } $search = $ldap->search( 'ou=companies,o=libre-entreprise', '(&(objectClass=leorganization)(userClass=Libre-entreprise))' ); if (PEAR::isError($search)) { die($search->getMessage() . "\n"); } foreach($entry = $search->entries() as $entry) { $activity = $entry -> getValue('leWorkingCategory'); $name = $entry -> getValue('cn'); echo $name." : getValue('jpegPhoto'))."\"/>
\n"; } $ldap -> done();