I’m working profesionally on a php web application which contains contacts, among other data. I was wondering how hard it would be to make this data available to external programs using the LDAP protocol.
Are there specific tools out there for this? I couldn’t really find anything, but I can’t imagine I’m the first to think about this.
Edit 1: What I’m looking for is a way to have an application (like a mail client) to be able to use a standard ldap lookup to find contacts from my data.
There are no limitations on using third party software or a separate ldap server on my side, but I want the clients to simply be able to use the built-in ldap connectivity of their application of choice.
What I could see is an ldap server which uses my database or service in my application for serving data as if my application itself is an ldap server. I’d prefer a solution like this, because I don’t feel it’s right to bloat the application with ldap functionality if I can use an external server for this.
The LDAP server protocol is big, and I don’t think there is a PHP server in existence. I would suggest running an LDAP server and pushing records to it.
I like OpenLDAP, but there are plenty of servers out there, depending on your platform. Even ActiveDirectory is an LDAP server.
Typically, LDAP objects have internal tracking attributes. For example, OpenLDAP has
modifyTimestampwhich looks something like20080306214429Z. These don’t get returned by the server unless you specifically ask for them in your query.It would be easy enough to write a crontab to compare modified times in LDAP and your database. If the LDAP
modifyTimestampwas older than in your database, update the record.