PHP LDAP Functions

EditRocket provides the following information on LDAP functions in the PHP source code builder.

string ldap_8859_to_t61 ( string $value ) - Translate ISO-8859 characters to t61 characters.

bool ldap_add ( resource $link_identifier , string $dn , array $entry ) - Add entries in the LDAP directory.

bool ldap_bind ( resource $link_identifier [, string $bind_rdn [, string $bind_password ]] ) - Binds to the LDAP directory with specified RDN and password.

-

mixed ldap_compare ( resource $link_identifier , string $dn , string $attribute , string $value ) - Compare value of attribute with value of same attribute in an LDAP directory entry.

resource ldap_connect ([ string $hostname [, int $port ]] ) - Establishes a connection to a LDAP server on a specified hostname and port.

int ldap_count_entries ( resource $link_identifier , resource $result_identifier ) - Returns the number of entries stored in the result of previous search operations.

bool ldap_delete ( resource $link_identifier , string $dn ) - Deletes a particular entry in LDAP directory.

string ldap_dn2ufn ( string $dn ) - Turns the specified dn, into a more user-friendly form, stripping off type names.

string ldap_err2str ( int $errno ) - Returns the string error message explaining the error number errno. While LDAP errno numbers are standardized, different libraries return different or even localized textual error messages. Never check for a specific error message text, but always use an error number to check.

int ldap_errno ( resource $link_identifier ) - Returns the standardized error number returned by the last LDAP command.

string ldap_error ( resource $link_identifier ) - Returns the string error message explaining the error generated by the last LDAP command for the given link_identifier. While LDAP errno numbers are standardized, different libraries return different or even localized textual error messages. Never check for a specific error message text, but always use an error number to check.

array ldap_explode_dn ( string $dn , int $with_attrib ) -

string ldap_first_attribute ( resource $link_identifier , resource $result_entry_identifier ) - Gets the first attribute in the given entry.

resource ldap_first_entry ( resource $link_identifier , resource $result_identifier ) - Returns the entry identifier for first entry in the result.

resource ldap_first_reference ( resource $link , resource $result ) -

bool ldap_free_result ( resource $result_identifier ) - Frees up the memory allocated internally to store the result. All result memory will be automatically freed when the script terminates.

array ldap_get_attributes ( resource $link_identifier , resource $result_entry_identifier ) - Reads attributes and values from an entry in the search result.

string ldap_get_dn ( resource $link_identifier , resource $result_entry_identifier ) - Finds out the DN of an entry in the result.

array ldap_get_entries ( resource $link_identifier , resource $result_identifier ) - Reads multiple entries from the given result, and then reading the attributes and multiple values.

bool ldap_get_option ( resource $link_identifier , int $option , mixed &$retval ) - Sets retval to the value of the specified option.

array ldap_get_values ( resource $link_identifier , resource $result_entry_identifier , string $attribute ) - Reads all the values of the attribute in the entry in the result.

array ldap_get_values_len ( resource $link_identifier , resource $result_entry_identifier , string $attribute ) - Reads all the values of the attribute in the entry in the result.

resource ldap_list ( resource $link_identifier , string $base_dn , string $filter [, array $attributes [, int $attrsonly [, int $sizelimit [, int $timelimit [, int $deref ]]]]] ) - Performs the search for a specified filter on the directory with the scope LDAP_SCOPE_ONELEVEL.

bool ldap_mod_add ( resource $link_identifier , string $dn , array $entry ) - Adds one or more attributes to the specified dn. It performs the modification at the attribute level as opposed to the object level.

bool ldap_mod_del ( resource $link_identifier , string $dn , array $entry ) - Removes one or more attributes from the specified dn. It performs the modification at the attribute level as opposed to the object level.

bool ldap_mod_replace ( resource $link_identifier , string $dn , array $entry ) - Replaces one or more attributes from the specified dn. It performs the modification at the attribute level as opposed to the object level.

bool ldap_modify ( resource $link_identifier , string $dn , array $entry ) - Modify the existing entries in the LDAP directory.

string ldap_next_attribute ( resource $link_identifier , resource $result_entry_identifier ) - Retrieves the attributes in an entry.

resource ldap_next_entry ( resource $link_identifier , resource $result_entry_identifier ) - Retrieve the entries stored in the result. Successive calls to the ldap_next_entry() return entries one by one till there are no more entries.

resource ldap_next_reference ( resource $link , resource $entry ) -

bool ldap_parse_reference ( resource $link , resource $entry , array &$referrals ) -

bool ldap_parse_result ( resource $link , resource $result , int &$errcode [, string &$matcheddn [, string &$errmsg [, array &$referrals ]]] ) -

resource ldap_read ( resource $link_identifier , string $base_dn , string $filter [, array $attributes [, int $attrsonly [, int $sizelimit [, int $timelimit [, int $deref ]]]]] ) - Performs the search for a specified filter on the directory with the scope LDAP_SCOPE_BASE. So it is equivalent to reading an entry from the directory.

bool ldap_rename ( resource $link_identifier , string $dn , string $newrdn , string $newparent , bool $deleteoldrdn ) - The entry specified by dn is renamed/moved.

bool ldap_sasl_bind ( resource $link [, string $binddn [, string $password [, string $sasl_mech [, string $sasl_realm [, string $sasl_authz_id [, string $props ]]]]]] ) -

resource ldap_search ( resource $link_identifier , string $base_dn , string $filter [, array $attributes [, int $attrsonly [, int $sizelimit [, int $timelimit [, int $deref ]]]]] ) - Performs the search for a specified filter on the directory with the scope of LDAP_SCOPE_SUBTREE. This is equivalent to searching the entire directory.

bool ldap_set_option ( resource $link_identifier , int $option , mixed $newval ) - Sets the value of the specified option to be newval.

bool ldap_set_rebind_proc ( resource $link , callback $callback ) -

bool ldap_sort ( resource $link , resource $result , string $sortfilter ) -

bool ldap_start_tls ( resource $link ) -

string ldap_t61_to_8859 ( string $value ) -

bool ldap_unbind ( resource $link_identifier ) - Unbinds from the LDAP directory.