<?php // using ldap bind $ldaprdn = 'username@mydomain.COM'; // ldap rdn or dn $ldappass = 'mypassword'; // associated password // connect to ldap server $ldapconn = ldap_connect("LDAP IP") or die("Could not connect to LDAP server."); if ($ldapconn) { // binding to ldap server $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass); // verify binding if ($ldapbind) { echo "LDAP bind successful..."; } else { echo "LDAP bind failed..."; } } ?>
In reply to Simple LDAP auth for CGI by mhearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |