下一篇 » « 上一篇

ldap_search

作者:semirock    时间:2009-01-28    来源:http://444p.com    点击:23051    本文共1篇文章 字体:[ ]

ldap_search

<HTML>
<HEAD>
<TITLE>ldap_search</TITLE>
</HEAD>
<BODY>
<?
// connect to LDAP server
$ldap=ldap_connect("ldap.itd.umich.edu");

if($ldap)
{
// set up search criteria
$dn = "o=Clear Ink, c=US";
$filter = "(|(sn=Atkinson)(givenname=L*))";
$attributes =
array( "ou", "sn", "givenname", "mail");

// perform search
$result = ldap_search($ldap, $dn,
$filter, $attributes);

if($result)
{
print(ldap_count_entries($ldap, $result));
print(" entries.<BR>\n");

print("DN: ");
print(ldap_get_dn($ldap, $result));
print("<BR>\n");

// get entries
$entry = ldap_get_entries($ldap, $result);
print($entry["count"] . php学习之家http://www.444p.com
" entries found.<BR>\n");

ldap_free_result($result);
}
else
{
print("Nothing found");
}

// close connection
ldap_close($ldap);
}
else
{
echo "<B>Connection failed!</B>";
}
?>
</BODY>
</HTML>

最新评论(共有 47 条评论)更多评论...

  • 游客: Ajihapuw的评论 (2017-09-06 08:06 am)
    domperidone breastfeeding not working [url=http://chinakari39.tumblr.com/#43775]chinakari39.tumblr.com[/url] drug to increase breast milk production
  • 游客: Akudzukad的评论 (2017-08-30 09:13 am)
    domperidone ventricular arrhythmia and sudden death [url=http://chinakari39.tumblr.com/#54944]buy domperidone online[/url] iron sucrose usp monograph
  • 游客: Ajigochio的评论 (2017-08-28 16:22 pm)
    effects of domperidone on heart [url=http://chinakari39.tumblr.com/#12340]chinakari39.tumblr.com[/url] happi d capsules side effects
  • 游客: Azogashir的评论 (2017-08-26 11:14 am)
    domperidone suspension domstal 30ml [url=http://chinakari39.tumblr.com/#26382]chinakari39-domperidone[/url] how can stop snoring
  • 游客: Agegudaa的评论 (2017-08-23 19:09 pm)
    is domperidone safe for infants [url=http://chinakari39.tumblr.com/#79422]chinakari39.tumblr.com[/url] ibuprofen related compound c
发表评论
密码: (游客不需要密码)
记住我【Alt+S 或 Ctrl+Enter 快速提交】

搜索工具


《PHP函数》点击排行