• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. PHP > LDAP Functions

16.22. LDAP Functions

The following functions are used to communicate with a Lightweight Directory Access Protocol (LDAP) server.


int ldap_add(int link, string dn, array entry)

Add entries to an LDAP directory


int ldap_bind(int link [, string dn, string password])

Bind to an LDAP directory


int ldap_close(int link)

Alias for ldap_unbind


int ldap_connect([string host [, int port]])

Connect to an LDAP server


int ldap_count_entries(int link, int result)

Count the number of entries in a search result


int ldap_delete(int link, string dn)

Delete an entry from a directory


string ldap_dn2ufn(string dn)

Convert a distinguished name to a user-friendly naming format


array ldap_explode_dn(string dn, int with_attrib)

Split a distinguished name into its component parts


string ldap_first_attribute(int link, int result, int ber)

Return the first attribute


int ldap_first_entry(int link, int result)

Return the first result ID


int ldap_free_result(int result)

Free result memory


array ldap_get_attributes(int link, int result)

Get attributes from a search result entry


string ldap_get_dn(int link, int result)

Get the distinguished name of a result entry


array ldap_get_entries(int link, int result)

Get all result entries


array ldap_get_values(int link, int result, string attribute)

Get all values from a result entry


int ldap_list(int link, string base_dn, string filter [, string attributes])

Single-level search


int ldap_modify(int link, string dn, array entry)

Modify an LDAP entry


string ldap_next_attribute(int link, int result, int ber)

Get the next attribute in result


int ldap_next_entry(int link, int entry)

Get the next result entry


int ldap_read(int link, string base_dn, string filter [, string attributes])

Read an entry


int ldap_search(int link, string base_dn, string filter [, string attributes])

Search LDAP tree under base_dn


int ldap_unbind(int link)

Unbind from an LDAP directory


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint