In this second, and concluding, article, dig deeper into PHP'sLDAP API by writing complex search queries and building a Web-basedadministration module to retrieve and modify entries from the LDAP directorytree.
In the first part of this article, I gave you a crash course in the basics of using PHP with LDAP, demonstrating how PHP's built-in support for LDAP makes it easy to query an LDAP directory server for user information. That article also included a detailed discussion of the steps that make up a PHP-to-LDAP session, together with examples demonstrating how those steps play out in the real world.
In this second (and concluding) article, I will carry the torch onwards, explaining how to perform more complex searches with LDAP. Since PHP comes with a whole bunch of functions for updating LDAP directory servers, I'll also examine those, with examples of how they can be used to add, modify and delete entries to the LDAP directory tree. Let's get going!