1. Go to this page and download the library: Download stepansib/ldap library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stepansib / ldap example snippets
use StepanSib\LDAP\LDAP;
$ldap = new LDAP2(array(
'host' => 'server.company.com',
'username' => 'johndoe',
'password' => '12345',
'domain' => 'Company',
'base_dn' => 'DC=Company,DC=com',
'anonymous' => false, // Optional parameter
'can_login_via_shortname' => true, // Optional parameter, set to false if your LDAP instance