PHPackages                             nilemin/php-http-virtualmin-api - 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. nilemin/php-http-virtualmin-api

ActiveLibrary

nilemin/php-http-virtualmin-api
===============================

PHP implementation of Virtualmin's remote api

v1.0.0(7y ago)13854[1 issues](https://github.com/tsvetelintsonev/php-http-virtualmin-api/issues)MITPHPPHP &gt;=7.0CI failing

Since Apr 22Pushed 4y ago4 watchersCompare

[ Source](https://github.com/tsvetelintsonev/php-http-virtualmin-api)[ Packagist](https://packagist.org/packages/nilemin/php-http-virtualmin-api)[ RSS](/packages/nilemin-php-http-virtualmin-api/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

php-virtualmin-remote-api
=========================

[](#php-virtualmin-remote-api)

> **Note:** This is not a full featured implementation of the API. However it is really easy to add new functionalities to the library if needed.

### Requirements

[](#requirements)

`PHP >= 7.0`

### Install

[](#install)

Composer

```
{
    "require": {
        "nilemin/php-http-virtualmin-api": ">=v1.0"
    }
}
```

Note: Full documentation will be added soon.

### API examples

[](#api-examples)

```
use Nilemin\Virtualmin\DNS\DNSRecord;
use Nilemin\Virtualmin\Managers\DNS\DNSRecordTypes;
use Nilemin\Virtualmin\Managers\Server\ServerTypes;
use Nilemin\Virtualmin\Managers\SSL\CSRInfo;
use Nilemin\Virtualmin\Virtualmin;
use Nilet\Components\Configuration\Config;
use Nilet\Components\FileSystem\Directory;

require_once "vendor/autoload.php";

$config = new Config();
$config->setConfigDir(new Directory(__DIR__ . "/config"));
$api = new Virtualmin("domain.com", 1221, "root", "password", $config);

$domain = "domain.com";
```

Email and Ftp accounts

```
$emailManager = $api->createEmailManager();
$ftpManager = $api->createFtpManager();
$emailManager->createEmailAccount($domain, "emailaccount1", "123", "Real name", 5);
$ftpManager->createFtpAccount($domain, "onlyftp4", "123");

$emailManager->changeEmailAccountQuota($domain, "emailaccount1", 10);

$emailManager->disableEmailAccount($domain, "emailaccount1");
$ftpManager->disableFtpAccount($domain, "onlyftp1");

$emailManager->enableEmailAccount($domain, "emailaccount1");
$ftpManager->enableFtpAccount($domain, "onlyftp1");

$emailManager->fetchEmailAccounts($domain);
$ftpManager->fetchFtpAccounts($domain);

$emailManager->deleteEmailAccount($domain, "emailaccount1");
$ftpManager->deleteFtpAccount($domain, "onlyftp1");

```

Database

```
$dBManager = $api->createDatabaseManager();
$dBManager->createDatabase($domain, "mysqldbtest");
$dBManager->deleteDatabase($domain, "mysqldbtest");

$dBManager->fetchDatabasesNames($domain);
$dBManager->fetchDatabases($domain);

$dBManager->grantDatabaseAccess($domain, "emailaccount1", "test2");
$dBManager->grantDatabaseAccess($domain, "onlyftp1", "test1");

$dBManager->removeDatabaseAccess($domain, "emailaccount1", "test2");
$dBManager->removeDatabaseAccess($domain, "onlyftp1", "test1");
```

Virtual server

```
$vsManager = $api->createVirtualServerManager();
$vsManager->changeServerName($domain, "newdomain.org");
$vsManager->changeAdminPassword($domain, "7777");

$options = [
    "dns",
    "mail"
];
$vsManager->createSubServer("sub1.domain.org", $domain, "Sub 1", $options);
$vsManager->deleteServer("sub1.domain.org");

$vsManager->fetchAddonServers("domain");
$vsManager->fetchSubServers("domain");
$vsManager->fetchSubServersNames($domain, "domain");
$vsManager->fetchAddonServersNames($domain, "domain");
$vsManager->fetchServer($domain, ServerTypes::TOP_LEVEL_SERVER);

$vsManager->createServerAlias("domain-alias.org", "domain.org", "");
$vsManager->fetchAliasServers("domain");

$vsManager->addServerRedirect("domain.org", "/", "http://domain-redirect.org");
$vsManager->addServerRedirect("domain.org", "/asas", "http://domain-redirect-asas.org");

$vsManager->fetchServerRedirects($domain);

$vsManager->deleteServerRedirect($domain, "/");
$vsManager->deleteServerRedirect($domain, "/asas");
```

DNS

```
$dnsManager = $api->createDnsManager();
$dnsManager->addSpfHostnames($domain, ["domain-spf-test.org", "192.168.1"]);
$dnsManager->deleteSpfHostnames($domain, ["domain-spf-test.org", "192.168.1"]);

$dnsRecords = [
    new DNSRecord("TXT-test1", DNSRecordTypes::TXT, "TXT test value", 666),
    new DNSRecord("TXT-test2", DNSRecordTypes::TXT, "TXT test value", 777),
    new DNSRecord("TXT-test4", DNSRecordTypes::TXT, "TXT test value", 777)
];
$dnsManager->deleteDnsRecords($domain, $dnsRecords);
$dnsManager->addDnsRecords($domain, $dnsRecords);
$dnsManager->fetchDNSRecords($domain);
$dnsManager->fetchSPFOptions($domain);
```

SSL

```
$sslManager = $api->createSslManager();
$csrInfo = new CSRInfo();
$csrInfo->setOrganization("Organization")
    ->setOrganizationUnit("unit")
    ->setCountryCode("dk")
    ->setState("MidtJylland")
    ->setCity("Viborg")
    ->setEmail("test@email.com")
    ->setDomainName($domain);
echo $sslManager->generateCSR($csrInfo);
echo $sslManager->getCSRContent($domain);
```

PHP

```
$phpManager = $api->createPhpManager();
$phpManager->fetchPHPDirectories($domain);
$phpManager->fetchInstalledPHPVersions();

$phpManager->addPHPDirectory($domain, "test_php_dr2", "7.0");
$phpManager->addPHPDirectory($domain, "test_php_dr3", "5.6");

$phpManager->deletePHPDirectory($domain, "test_php_dr2");
$phpManager->deletePHPDirectory($domain, "test_php_dr3");

$phpManager->fetchPHPIniVars($domain, "7.0", $config->get("config")["userModifiableIniVars"]);
$phpManager->modifyPHPIniVars($domain, "7.0", ["max_execution_time" => 60, "display_errors" => 0]);
```

Script installers

```
$scriptManager = $api->createScriptsManager();
$scriptManager->installCMS($domain, $config->get("config")["scripts"]["cms"]["wordpress"]);
$scriptManager->installPHPMyAdmin($domain, $config->get("config")["scripts"]["dbPanels"]["phpmyadmin"]);

$scriptManager->deleteScript($domain, "phpmyadmin");

$scriptManager->fetchInstalledScripts($domain);
$scriptManager->fetchInstalledScript($domain, "wordpress");
```

###  Health Score

30

—

LowBetter than 67% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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

Unknown

Total

1

Last Release

2890d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e014acd2f0c831bd8b1a91b4a10774f71122cb0b32aadfc09cc996fa7693131?d=identicon)[tsvetelin](/maintainers/tsvetelin)

---

Top Contributors

[![tsvetelintsonev](https://avatars.githubusercontent.com/u/14884588?v=4)](https://github.com/tsvetelintsonev "tsvetelintsonev (6 commits)")[![miguel456](https://avatars.githubusercontent.com/u/18035784?v=4)](https://github.com/miguel456 "miguel456 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nilemin-php-http-virtualmin-api/health.svg)

```
[![Health](https://phpackages.com/badges/nilemin-php-http-virtualmin-api/health.svg)](https://phpackages.com/packages/nilemin-php-http-virtualmin-api)
```

PHPackages © 2026

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