PHP has a lot of built in methods to handle LDAP (since version 4)...
ldap_connect[
^] - to connect to LDAP server
ldap_list[
^] - to list entries in single level
ldap_search[
^] - to search in LDAP tree
ldap_get_entries[
^] - to get actiul entry values
For the whole package read here:
LDAP[
^]