ldap_first_entry

string ldap_first_entry(resource connectionID, int result) 
connectionID Link ID from which to retrieve entries
result Result ID of a search operation

Fetches the first entry.

Returns:

Entry ID; FALSE on failure

Description:

Returns the entry identifier for the first result in an LDAP result set. The entry identifier is passed on to other functions to extract information about the entry, and to retrieve the next entry in the result set.

Availability:

UNIX/Linux, Windows

Version:

3+, 4+

Example:

Retrieve entries in a loop
 ldap_connect ($host); $bind = ldap_bind ($ldapconn,"uid=www,ou=People,dc=foo,dc=com","secret"); $result = ldap_search($ldap_conn, "ou=People,dc=foo,dc=com", $filter); $count = ldap_count_entries($ldap_conn, ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.