PHPackages                             bambooboo/phpldap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bambooboo/phpldap

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bambooboo/phpldap
=================

some basic methods about ldap's management by php

1135PHP

Since Jun 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/banbooboo/phpldap)[ Packagist](https://packagist.org/packages/bambooboo/phpldap)[ RSS](/packages/bambooboo-phpldap/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

phpldap
-------

[](#phpldap)

A basic Ldap wrapper for PHP (see  for more information about the libcurl extension for PHP)

Installation
------------

[](#installation)

Click the download link above or git clone

and you can see the project:

```
CHANGELOG.md   CONTRIBUTING.md  README.md  tests
composer.json  LICENSE          src

```

run `composer install`,and will find new files `vendor`

```
CHANGELOG.md   CONTRIBUTING.md  README.md  tests
composer.json  LICENSE          src        vendor

```

Usage
-----

[](#usage)

### Initialization

[](#initialization)

imply require and initialize the ldap class like so:

```
require '../vendor/autoload.php';

//create phpLdap object
$ldapObj=new Bambooboo\PHPLdap\Ldap();

```

just like `tests/LdapTest.php`

### Examples:

[](#examples)

```
//Connect to an LDAP server and Bind to LDAP directory
$ldap_res=$ldapObj->LdapInit($ldap_manager,$ldap_password,$url,$port);

//Get all result entries
$info=$ldapObj->LdapGetEntries($ldap_res,$dn,$filter,$justthese=null);

//Get the DN of a result entry
$ldapObj->LapGetDN($ldap_res,$dn,$filter);

//Get the DN of a result entry
$ldapObj->LapGetDN($ldap_res,$dn,$filter);

//Add entries to LDAP directory
$ldapObj->LdapAdd($ldap_res,$dn);

//Delete an entry from a directory
$ldapObj->LdapDel($ldap_res,$dn);

//Delete attribute values from current attributes
$ldapObj->LdapModDel($ldap_res,$dn,$entry);

//Replace attribute values with new ones
$ldapObj->LdapModReplace($ldap_res,$dn,$entry);

//Add attribute values to current attributes
$ldapObj->LdapModAdd($ldap_res,$dn,$entry);

```

Returns a complete result information in a multi-dimensional array on success and FALSE on error.

Which would display something like

```
Array
(
    [count] => 1
)

```

### Testing

[](#testing)

Refine the file's ldap information which `tests/LdapTest.php`, and then run `php tests/LdapTest.php`

### Contact

[](#contact)

Problems, comments, and suggestions all welcome:

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a05200f92f3820b3d1892ac4a1aadb9ee915bf8cf8aef8d711f7bd79f3760969?d=identicon)[banbooboo](/maintainers/banbooboo)

---

Top Contributors

[![banbooboo](https://avatars.githubusercontent.com/u/15230717?v=4)](https://github.com/banbooboo "banbooboo (5 commits)")

### Embed Badge

![Health badge](/badges/bambooboo-phpldap/health.svg)

```
[![Health](https://phpackages.com/badges/bambooboo-phpldap/health.svg)](https://phpackages.com/packages/bambooboo-phpldap)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
