Your IP : 216.73.216.40


Current Path : /var/www/html/venkat/elective20dec2016/
Upload File :
Current File : /var/www/html/venkat/elective20dec2016/test.php

<?php
$ldaprdn = "venkat";     // ldap rdn or dn
$ldappass = "v";

// connect to ldap server
$ldapconn = ldap_connect("172.31.1.42")
    or die("Could not connect to LDAP server.");

if ($ldapconn) {
    echo "binding";
    // binding to ldap server
    //ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION,3);
    $ldapbind = ldap_bind($ldapconn);

    // verify binding
    if ($ldapbind) {
        echo "LDAP bind successful...";
    } else {
        echo "LDAP bind failed...";
    }

}

?>