A
A
Alyosha2018-02-13 09:13:51
PHP
Alyosha, 2018-02-13 09:13:51

How to connect to a website via LDAP in PHP?

How to connect to a website via LDAP in PHP?
Not a single site can connect anonymously or by account. What am I doing wrong?
<?php
//using ldap bind anonymously
// connect to ldap server
$ldapconn = ldap_connect("dotnet46.ru")
or die("Could not connect to LDAP server.");
if ($ldapconn) {
// binding anonymously
$ldapbind = ldap_bind($ldapconn);
if ($ldapbind) {
echo "LDAP bind anonymous successful...";
} else {
echo "LDAP bind anonymous failed...";
}
}
?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question