Created
March 24, 2012 00:35
-
-
Save mohamedmansour/2176758 to your computer and use it in GitHub Desktop.
Testing LDAP in PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ds = @ldap_connect(ldap_host); | |
if ($ds) { | |
$r = @ldap_bind($ds, 'mmansour@DOMAIN', 'bad'); | |
if ($r) { | |
echo "Success"; | |
} | |
else { | |
echo "Failed"; | |
} | |
ldap_close($ds); | |
} else { | |
echo "Unable to connect to LDAP server"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment