boolean search(string filter)
The search() function will search through the ENTIRE directory structure for the specified filter. It will return TRUE if the search was successful, otherwise it will return FALSE. Keep in mind that a successful search does not neccessarily return any entries.

The search() function only performs the search. You will need to use the fetch() function to retrieve the data.

For information on LDAP search filters, look at the ldap_search man page, or visit RFC 1558.


$ldap = new LDAP();
$attrs[$ldap->getDN()] = $ldap->fetch();