ldap_init

  • Version 3.5 and earlier: ldap_init() function available.
  • Version 4.0 and later: ldap_init() function deprecated.

Initializes a connection to an LDAP database. This function supersedes ldap_open() and ldap_init().

ldap_initialize (ldap_url [, 2 | 3])
ldap_url Required, string. An LDAP URL pointing to the desired LDAP database.
version Optional, number. The LDAP database version. Either a 2 or 3. If the version is not included, then a version 2 connection is created.

On success, an LDAP Connection is returned. On failure, null is returned.

connection = ldap_initialize("ldap://ldaphost");

For more information, please see the following: