People!

I am getting nuts here about this thing i am working on right now.
I am trying to get make a ldap php script that get information about a user.

I can connect to the ldap server and get response on how many entries that was found.
But how do i print out something of use.

I mean. How do i get all the information from the entrie?

I mean i do a ldap search and get the answer from my script that 1 entrie was found.
Now i want to print out that entry.
his     email
        first name, last name
        department

etc etc

But how do i do that?
I am getting nuts.
If you dont know it perhaps you know a GOOD "how to" that i can use?
Please help me with this. Would be really usefull.

This script works and returns the amount of entries. Now i want to display the 
information.

echo "<h3>LDAP query test</h3>";
echo "Connecting ...";
$ds=ldap_connect("localhost");  // must be a valid LDAP server!
echo "connect result is ".$ds."<p>";

if ($ds) { 
    echo "Binding ..."; 
    $r=ldap_bind($ds);     // this is an "anonymous" bind, typically
                           // read-only access
    echo "Bind result is ".$r."<p>";

    echo "Searching for (sn=S*) ...";
    // Search surname entry
    $sr=ldap_search($ds,"o=My Company, c=US", "sn=S*");  
    echo "Search result is ".$sr."<p>";

//Johan

-- 
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]

Reply via email to