Here’s the scenario:
We use LDAP to store the information on staff such as names, usernames, email addresses, telephone numbers, photos, passwords etc.
We want a webpage the displays up to date details off all the staff in our organisation. We would like to dynamically extract the information about the staff from our existing LDAP database and present it as a webpage on our intranet.
1. Download the scripts I’ve written here and extract them to a directory on your Intranet server or somewhere suitable.
EG. http://intranet/StaffDirectory/
2. Configure the script.
Enter you LDAP hostname and distinguished name.
Users have previously created using the inetOrgPerson LDAP object Class. This gives us attributes to use such as displayName, mail, telephoneNumber and jpegPhoto.
We enter the LDAP atrributes we wish to extract into the $params array below.
$ip = “your_ldap_hostname”;
$dn = “dc=example,dc=org”;
$params = array( “displayName”, “mail”, “telephoneNumber”, “jpegPhoto”);
3. Browse to http://intranet/StaffDirectory/index.php to view all the the details of you staff members.
June 23rd, 2008 at 12:20 pm
HI,
I am unsure about how to create an ldap connection to our active directory. I need to create a phone list.
first name, last anme, departmetn, phone, mobile, location
June 23rd, 2008 at 6:48 pm
FYI this does not appear to work with Active Directory LDAP. Any chance of getting an ActiveDirectory version?