<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Using the PHP LDAP calls</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ldap.constants.html">Predefined Constants</a></div> <div class="next" style="text-align: right; float: right;"><a href="ldap.examples.html">Examples</a></div> <div class="up"><a href="book.ldap.html">LDAP</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="ldap.using" class="chapter"> <h1>Using the PHP LDAP calls</h1> <p class="para"> Before you can use the LDAP calls you will need to know .. <ul class="itemizedlist"> <li class="listitem"> <p class="para"> The name or address of the directory server you will use </p> </li> <li class="listitem"> <p class="para"> The "base dn" of the server (the part of the world directory that is held on this server, which could be "o=My Company,c=US") </p> </li> <li class="listitem"> <p class="para"> Whether you need a password to access the server (many servers will provide read access for an "anonymous bind" but require a password for anything else) </p> </li> </ul> </p> <p class="para"> The typical sequence of LDAP calls you will make in an application will follow this pattern: <pre class="literallayout"> ldap_connect() // establish connection to server | ldap_bind() // anonymous or authenticated "login" | do something like search or update the directory and display the results | ldap_close() // "logout" </pre> </p> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ldap.constants.html">Predefined Constants</a></div> <div class="next" style="text-align: right; float: right;"><a href="ldap.examples.html">Examples</a></div> <div class="up"><a href="book.ldap.html">LDAP</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>