11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

www.it-ebooks.infoCHAPTER 17 • <strong>PHP</strong> AND LDAPConnecting to an LDAP ServerThe ldap_connect() function establishes a connection to an LDAP server identified by a specific hostname and optionally a port number. Its prototype follows:resource ldap_connect([string hostname [, int port]])If the optional port parameter is not specified, and the ldap:// URL scheme prefaces the server orthe URL scheme is omitted entirely, LDAP’s standard port 389 is assumed. If the ldaps:// scheme isused, port 636 is assumed. If the connection is successful, a link identifier is returned; on error, FALSE isreturned. A simple usage example follows:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!