Using PHP With LDAP (part 2) - Endgame (
Page 8 of 8 )
And that's about it for the
moment. In this concluding article, I delved further into the PHP API for LDAP,
demonstrating the PHP functions that let you retrieve and modify data in the
LDAP directory tree. After a brief detour to demonstrate how you can easily
build search forms for complex LDAP queries, I took you through the process of
building a Web-based administration module for an LDAP directory, demonstrating
the PHP API calls that allow you to add new entries to, and modify and delete
existing entries from, the LDAP server. I also took a brief look at PHP's
error-handling capabilities in the LDAP world, demonstrating the two PHP
functions that can be used to trap and gracefully handle errors in your PHP-LDAP
scripts.
Obviously, this is just the beginning - LDAP has a whole bunch
of different applications, and PHP is well-suited to all of them. The synergy
between the two technologies cannot be overemphasized, and, as the LDAP API in
PHP evolves, you can expect to see more and more applications building on this
synergy.
In case you'd like to learn more about PHP and LDAP, I'd
recommend some quality time with the following links:
Understanding LDAP,
at
Understanding LDAPThe
PHP manual pages for LDAP, at
http://www.php.net/manual/en/ref.ldap.phpThe
official OpenLDAP Web site, at
http://www.openldap.org/A discussion
of OpenLDAP installation, at
http://www.newarchitectmag.com/documents/s=5641/new1013637552/sidebar2.htmString
representation of LDAP search filters, at
http://www.ietf.org/rfc/rfc2254.txtUntil
next time...be good!
Note: Examples are illustrative only, and are not
meant for a production environment. Melonfire provides no warranties or support
for the source code described in this article. YMMV!