Re: LDAP question PLEASE help me.
| From: | Reuben D Budiardja | Date: | Tue, 17 Jul 2001 13:03:55 +0000 |
| Subject: | Re: LDAP question PLEASE help me. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-58264@lists.php.net to get a copy of this message | ||
Use ldap_get_entries. See here:
http://www.php.net/manual/en/function.ldap-get-entries.php
Check the bottom of your code, I put something in there.
On Tuesday 17 July 2001 07:27 am, Johan Vikerskog (ECS) wrote:
> People!
>>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>";
$result = ldap_get_entries($ds, $sr);
print_r($result); // Let's just see what's in there.
Hope that helps.
Reuben D. Budiardja
> //Johan