PHPackages                             swiatprzesylek/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. swiatprzesylek/directadmin

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

swiatprzesylek/directadmin
==========================

PHP client library to manage DirectAdmin control panel servers.

023PHP

Since Aug 8Pushed 1y agoCompare

[ Source](https://github.com/swiatprzesylek/directadmin)[ Packagist](https://packagist.org/packages/swiatprzesylek/directadmin)[ RSS](/packages/swiatprzesylek-directadmin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#directadmin-api-client)

[![Build Status](https://camo.githubusercontent.com/1af90a3e9ac5e16355142e616a0e6baaccb20d63468b5d8a31b5ac79d5faa2ca/68747470733a2f2f7472617669732d63692e6f72672f6f6d696e65732f64697265637461646d696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/omines/directadmin)[![Coverage Status](https://camo.githubusercontent.com/ec1ad25970cae5859bdc89240b736f314f8270b96febfd1b6d9acc10fcb2d89a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6f6d696e65732f64697265637461646d696e2f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/omines/directadmin?branch=master)[![Scrutinizer](https://camo.githubusercontent.com/82ae8106e742d7b03c982af6a370f32a4838130c50be30da53bbd789b77fc8a7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f6d696e65732f64697265637461646d696e2e737667)](https://scrutinizer-ci.com/g/omines/directadmin/?branch=master)[![SensioLabs Insight](https://camo.githubusercontent.com/4d29ccc1610ff7ebdc0315fdde2f9856d18e9c68ccd1741ddef6b34831840dfc/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f34376137313230342d663237342d343431362d396462312d3937373364363538343563612e737667)](https://insight.sensiolabs.com/projects/47a71204-f274-4416-9db1-9773d65845ca)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/omines/directadmin/master/LICENSE)

**This package is no longer supported by the original authors as we no longer use DirectAdmin. The library still worked fine when we left it, use at your own risk. If you want to take over just push your fork to Packagist, it's MIT all the way.**

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.

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

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

[](#installation)

[![Packagist](https://camo.githubusercontent.com/687911181b0c2ac308693aa913771994a2ac0eefb1fbcb371b15d64039b64cc6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6d696e65732f64697265637461646d696e2e737667)](https://packagist.org/packages/omines/directadmin)[![Packagist](https://camo.githubusercontent.com/ce1a0d09ce063931a3777f4622f6d876e4c80038517c0ff7c1fd67ef7f52d9cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f6f6d696e65732f64697265637461646d696e2e737667)](https://packagist.org/packages/omines/directadmin#dev-master)

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

```
composer require omines/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 6](https://github.com/guzzle/guzzle) as its HTTP communication layer. PHP versions supported are 5.6, 7.0, 7.1 and hhvm.

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

[](#basic-usage)

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

```
use Omines\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://omines.github.io/directadmin/api/class-Omines.DirectAdmin.Context.AdminContext.html), [`ResellerContext`](https://omines.github.io/directadmin/api/class-Omines.DirectAdmin.Context.ResellerContext.html), and [`UserContext`](https://omines.github.io/directadmin/api/class-Omines.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://omines.github.io/directadmin/api/class-Omines.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

16

—

LowBetter than 5% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 91.2% 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/a73ab244a55f62a45aa41eb471b2fa206ac4edf39308b94c4b7442afb8eaa0af?d=identicon)[swiatprzesylek](/maintainers/swiatprzesylek)

---

Top Contributors

[![curry684](https://avatars.githubusercontent.com/u/1455673?v=4)](https://github.com/curry684 "curry684 (145 commits)")[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (6 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (2 commits)")[![imadphp](https://avatars.githubusercontent.com/u/33043295?v=4)](https://github.com/imadphp "imadphp (2 commits)")[![jacobdekeizer](https://avatars.githubusercontent.com/u/15017400?v=4)](https://github.com/jacobdekeizer "jacobdekeizer (1 commits)")[![mvdgeijn](https://avatars.githubusercontent.com/u/50988060?v=4)](https://github.com/mvdgeijn "mvdgeijn (1 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")[![vlaim](https://avatars.githubusercontent.com/u/1304775?v=4)](https://github.com/vlaim "vlaim (1 commits)")

### Embed Badge

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

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

###  Alternatives

[nativephp/electron

Electron wrapper for the NativePHP framework.

519114.4k8](/packages/nativephp-electron)[abdelhamiderrahmouni/filament-monaco-editor

A monaco editor form field for filamentphp.

18182.2k](/packages/abdelhamiderrahmouni-filament-monaco-editor)[hiqdev/yii2-module-pages

Yii2 Pages Module

121.1k](/packages/hiqdev-yii2-module-pages)

PHPackages © 2026

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