/ / $ds is a valid link identifier for a directory server / / $person is all or part of a person' s name, eg "Jo "$dn = "o=My Company, c=US"; $filter="(_BAR_(sn=$person*)(givenname=$person*))"; $justthese = array ("ou", "sn", "givenname", "mail"); $sr=ldap_search($ds, $dn, $filter, $justthese); $info = ldap_get_entries($ds, $sr); print $info["count"]." entries returned p ";
?php / / $ds doit ecirc; tre une ressource de connexion valide / / $person est un nom ou une partie de nom (par exemple, "Jean") $dn = "o=Ma Compagnie, c=FR"; $filter="(_BAR_(sn=$person*)(givenname=$person*))"; $justthese = array ("ou", "sn", "givenname", "mail"); $sr=ldap_search($ds, $dn, $filter, $justthese); $info = ldap_get_entries($ds, $sr); print $info["count"]. "entr eacute;es trouv eacute;es. p";?