SHARE
TWEET

Untitled

a guest Oct 4th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $ldap = ldap_connect("ldap.example.com");
  4.  
  5. $user = "exampleUser";
  6. $pass = "examplePass";
  7.  
  8. if($bind = ldap_bind($ldap, $user, $pass)) {
  9.   // logged in
  10. } else {
  11.   // error message
  12. }
  13.  
  14. ?>
  15.    
  16. copy "C:wampbinphpphp5.4.16libsasl.dll" "C:wampbinapacheapache2.4.4binlibsasl.dll"
  17.    
  18. ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
  19. ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
  20. ldap_set_option($ldap, LDAP_OPT_DEBUG_LEVEL, 7);
  21.  
  22. if(!$ldap){
  23.     echo "LDAP Failed To Connect: ".ldap_error($ldap);
  24. }
  25.    
  26. SET PATH=C:wampbinphpphp5.3.13;%PATH%
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top