Skip to content

Instantly share code, notes, and snippets.

@yainakrub
yainakrub / LDAP
Created April 22, 2017 05:17
LDAP
<?php
$ldap_dn = "cn=read-only-admin,dc=example,dc=com";
$ldap_password = "password";
$ldap_con = ldap_connect("ldap.forumsys.com");
ldap_set_option($ldap_con, LDAP_OPT_PROTOCOL_VERSION, 3);
if(ldap_bind($ldap_con, $ldap_dn, $ldap_password)) {