This is a small test I wrote a couple of days ago that does just that.
Hope it works for you.
/Fredrik
<?php
$ldapserver = "orchide.habeebee.com";
$basedn = "dc=habeebee, dc=com";
$dir =ldap_connect($ldapserver); // Connect to server
if ($dir) {
ldap_bind($dir); // Bind to the server
$result = ldap_search($dir, $basedn, "sn=*"); // query connection, set
the base and look for any ”sn”
$info = ldap_get_entries($dir, $result); // The results get sent to
the $info object
for ($i=0; $i<$info["count"]; $i++) { // Count is a ldap feature that
contains the length of the resultset
echo $info[$i]["cn"][0]; // choose any parameter you want see here
}
ldap_close($dir);
}
?>
>>>>>>>>>>>>>>>>>> Ursprungligt meddelande <<<<<<<<<<<<<<<<<<
Mike Tuller <[EMAIL PROTECTED]> skrev 2001-02-28, kl. 01:31:09
angående ämnet [PHP] LDAP Listing:
> I want to create a list of everyone on the LDAP server, and none of the
> examples I have in my books seems to work. What functions should I use to
> connect to the server, and list users in the LDAP to create a phone book
> type list to print out? Could someone also give me some sort of example
that
> I can look at?
> Mike Tuller
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]