PHP Classes

Simple AD PHP LDAP Search Class: Search for people in Active Directory using LDAP

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 63 All time: 10,443 This week: 64Up
Version License PHP version Categories
simple-ad-search-php 1.0GNU General Publi...5PHP 5, Databases, Searching
Description 

Author

This package can search for people in Active Directory using LDAP.

It can connect to a directory server using a given user name, password, IP address, and domain controller identification.

The package can perform searches for user accounts in the directory using a given search string.

The class can also take parameters that can specify the types of user account details returned, such as the user name and email address.

Picture of Ákos Nikházy
Name: Ákos Nikházy <contact>
Classes: 10 packages by
Country: Hungary Hungary
Innovation award
Innovation award
Nominee: 1x

Example

<pre>
<?php
require('ADSearch.class.php');

// Make object.
// also it could be: $search = new ADSearch('user@domain.com','VerySecurePassword','0.0.0.0','389','DC=example,DC=com')
$search = new ADSearch();

// Do the search. Its false if something went wrong.
if($result = $search -> Search('John Smi'))
{
   
   
var_dump($result);
   
}
else
    echo
'Search failed';

echo
'<hr>';

// also it could be: $sarch -> Search('Smith',array('displayname','samaccountname','mail'));
if($result2 = $search -> Search('Jane Smith',array('mail')))
{
   
   
var_dump($result2);
   
}
else
    echo
'Search failed';


Details

Simple-AD-Search-PHP-Class

This is a simple class to do search in Active Directory though LDAP function in PHP.


  Files folder image Files (4)  
File Role Description
Plain text file ADSearch.class.php Class Class source
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:63
This week:0
All time:10,443
This week:64Up