PHPackages                             mvdgeijn/directadmin - 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. [API Development](/categories/api)
4. /
5. mvdgeijn/directadmin

ActiveLibrary[API Development](/categories/api)

mvdgeijn/directadmin
====================

PHP client library to manage DirectAdmin control panel servers.

v0.30.1(1mo ago)79.2k↑23%5MITPHPPHP &gt;=8.0

Since Mar 21Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/mvdgeijn/directadmin)[ Packagist](https://packagist.org/packages/mvdgeijn/directadmin)[ Docs](https://github.com/mvdgeijn/directadmin)[ RSS](/packages/mvdgeijn-directadmin/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (12)Versions (46)Used By (0)

DirectAdmin API client
======================

[](#directadmin-api-client)

[![Build Status](https://camo.githubusercontent.com/1af90a3e9ac5e16355142e616a0e6baaccb20d63468b5d8a31b5ac79d5faa2ca/68747470733a2f2f7472617669732d63692e6f72672f6f6d696e65732f64697265637461646d696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mvdgeijn/directadmin)[![Coverage Status](https://camo.githubusercontent.com/ec1ad25970cae5859bdc89240b736f314f8270b96febfd1b6d9acc10fcb2d89a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6f6d696e65732f64697265637461646d696e2f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/mvdgeijn/directadmin?branch=main)[![Scrutinizer](https://camo.githubusercontent.com/82ae8106e742d7b03c982af6a370f32a4838130c50be30da53bbd789b77fc8a7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f6d696e65732f64697265637461646d696e2e737667)](https://scrutinizer-ci.com/g/mvdgeijn/directadmin/?branch=main)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/mvdgeijn/directadmin/main/LICENSE)

This is a PHP client library to manage DirectAdmin control panel servers. We simply decided to develop this as we needed automation of our own DirectAdmin servers, and the existing implementations were unsupported and incomplete.

21-3-2022: Moved to mvdgeijn/directadmin, as omines/directadmin is abandoned and we needed more API implementations.

[API documentation for this project is automatically generated on each push](https://mvdgeijn.github.io/directadmin/api/).

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

[](#installation)

[![Packagist](https://camo.githubusercontent.com/f4b9bd99bd77c68c2f1ae6eed7f1c5d11b1d7d3ef87a5d059ea584657931ad24/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d76646765696a6e2f64697265637461646d696e2e737667)](https://packagist.org/packages/mvdgeijn/directadmin)[![Packagist](https://camo.githubusercontent.com/f5a6c0e0520f43ba43ae1dfc040ec51a4402896dbda57c95c81212e7b748c205/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f6d76646765696a6e2f64697265637461646d696e2e737667)](https://packagist.org/packages/mvdgeijn/directadmin#dev-master)

The recommended way to install this library is through [Composer](http://getcomposer.org):

```
composer require mvdgeijn/directadmin
```

If you're not familiar with `composer` follow the installation instructions for [Linux/Unix/Mac](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) or [Windows](https://getcomposer.org/doc/00-intro.md#installation-windows), and then read the [basic usage introduction](https://getcomposer.org/doc/01-basic-usage.md).

Dependencies
------------

[](#dependencies)

The library uses [Guzzle 7](https://github.com/guzzle/guzzle) as its HTTP communication layer. PHP versions supported are 7.0, 7.1, 8.0, 8.1 and hhvm.

Basic usage
-----------

[](#basic-usage)

To set up the connection use one of the base functions:

```
use Mvdgeijn\DirectAdmin\DirectAdmin;

$adminContext = DirectAdmin::connectAdmin('http://hostname:2222', 'admin', 'pass');
$resellerContext = DirectAdmin::connectReseller('http://hostname:2222', 'reseller', 'pass');
$userContext = DirectAdmin::connectUser('http://hostname:2222', 'user', 'pass');
```

These functions return an [`AdminContext`](https://mvdgeijn.github.io/directadmin/api/class-Mvdgeijn.DirectAdmin.Context.AdminContext.html), [`ResellerContext`](https://mvdgeijn.github.io/directadmin/api/class-Mvdgeijn.DirectAdmin.Context.ResellerContext.html), and [`UserContext`](https://mvdgeijn.github.io/directadmin/api/class-Mvdgeijn.DirectAdmin.Context.UserContext.html)respectively exposing the functionality available at the given level. All three extend eachother as DirectAdmin uses a strict is-a model. To act on behalf of a user you can use impersonation calls:

```
$resellerContext = $adminContext->impersonateReseller($resellerName);
$userContext = $resellerContext->impersonateUser($userName);
```

Both are essentially the same but mapped to the correct return type. Impersonation is also done implicitly when managing a user's domains:

```
$domain = $adminContext->getUser('user')->getDomain('example.tld');
```

This returns, if the domain exists, a [`Domain`](https://mvdgeijn.github.io/directadmin/api/class-Mvdgeijn.DirectAdmin.Objects.Domain.html)instance in the context of its owning user, allowing you to manage its email accounts et al transparently.

Contributions
-------------

[](#contributions)

As the DirectAdmin API keeps expanding pull requests are welcomed, as are requests for specific functionality. Pull requests should in general include proper unit tests for the implemented or corrected functions.

For more information about unit testing see the `README.md` in the tests folder.

Legal
-----

[](#legal)

This software was developed for internal use at [Omines Full Service Internetbureau](https://www.omines.nl/)in Eindhoven, the Netherlands. It is shared with the general public under the permissive MIT license, without any guarantee of fitness for any particular purpose. Refer to the included `LICENSE` file for more details.

The project is not in any way affiliated with JBMC Software or its employees.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance91

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

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.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~15 days

Total

45

Last Release

44d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2284dddd824502d695c7a0a091ed1934c7f139c82784367df09c9751dec28a2d?d=identicon)[mvdgeijn](/maintainers/mvdgeijn)

---

Top Contributors

[![mvdgeijn](https://avatars.githubusercontent.com/u/50988060?v=4)](https://github.com/mvdgeijn "mvdgeijn (86 commits)")

---

Tags

phpapilibrarydirectadmincontrol paneldirect admin

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mvdgeijn-directadmin/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M89](/packages/openai-php-laravel)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.7k409.0k6](/packages/theodo-group-llphant)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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