PHPackages                             ezscale/virtfusion-php - 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. ezscale/virtfusion-php

ActiveLibrary

ezscale/virtfusion-php
======================

PHP SDK for the VirtFusion hosting API

v1.1.0(1mo ago)00MITPHPPHP ^8.2

Since Mar 20Pushed 1mo agoCompare

[ Source](https://github.com/EZSCALE/virtfusion-php)[ Packagist](https://packagist.org/packages/ezscale/virtfusion-php)[ RSS](/packages/ezscale-virtfusion-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

VirtFusion PHP SDK
==================

[](#virtfusion-php-sdk)

PHP SDK for the [VirtFusion](https://virtfusion.com) hosting API. Built for **VirtFusion 6.2** (API v1).

Requirements
------------

[](#requirements)

- PHP 8.2+
- Guzzle 7+

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

[](#installation)

```
composer require ezscale/virtfusion-php
```

Quick Start
-----------

[](#quick-start)

```
use EZScale\VirtFusion\VirtFusion;

$vf = new VirtFusion('https://cp.domain.com', 'your-api-token');

// Test connection
$result = $vf->testConnection(); // ConnectionTestResult

// Server operations
$server = $vf->server(69)->get();           // Server DTO
$vf->server(69)->boot();                     // ActionResult
$vf->server(69)->shutdown();                 // ActionResult
$vf->server(69)->restart();                  // ActionResult
$vf->server(69)->powerOff();                 // ActionResult
$vf->server(69)->suspend();
$vf->server(69)->unsuspend();
$vf->server(69)->delete(delay: 30);

// Build / modify
$vf->server(69)->build(['reinstall' => true]);
$vf->server(69)->changePackage(5);
$vf->server(69)->modifyBackupPlan(2);
$vf->server(69)->modifyName('new-hostname');
$vf->server(69)->modifyCpuCores(4);
$vf->server(69)->modifyCpuThrottle(50, sync: true);
$vf->server(69)->modifyMemory(4096);
$vf->server(69)->changeOwner(42);

// Password / VNC
$vf->server(69)->resetPassword('root');
$vf->server(69)->vnc();
$vf->server(69)->enableVnc();
$vf->server(69)->disableVnc();

// Templates / Traffic stats
$vf->server(69)->templates();
$vf->server(69)->traffic();

// Custom XML
$vf->server(69)->customXml(['domain' => '', 'domainEnabled' => true]);

// Network
$vf->server(69)->addIpv4(['ips' => ['10.0.0.1']]);
$vf->server(69)->removeIpv4(['ips' => ['10.0.0.1']]);
$vf->server(69)->addIpv4Quantity(['quantity' => 1]);
$vf->server(69)->addToWhitelist(['ips' => ['1.2.3.4']]);
$vf->server(69)->removeFromWhitelist(['ips' => ['1.2.3.4']]);
$vf->server(69)->modifyTraffic(['limit' => 1000]);

// Firewall (sub-builder)
$vf->server(69)->firewall('primary')->get();       // FirewallConfig
$vf->server(69)->firewall('primary')->enable();
$vf->server(69)->firewall('primary')->disable();
$vf->server(69)->firewall('primary')->applyRules([1, 2, 5]);

// Traffic blocks (sub-builder)
$vf->server(69)->trafficBlocks()->list();           // TrafficBlock[]
$vf->server(69)->trafficBlocks()->add(['ip' => '1.2.3.4']);
$vf->server(69)->trafficBlocks()->remove(42);

// List servers
$vf->listServers();
$vf->listServersByUser(1);
$vf->createServer(['packageId' => 1, 'name' => 'web1']);

// Hypervisors
$vf->hypervisors()->list();
$vf->hypervisors()->get(1);                         // Hypervisor DTO
$vf->hypervisorGroups()->list();
$vf->hypervisorGroups()->group(3)->get();
$vf->hypervisorGroups()->group(3)->resources();

// Packages
$vf->packages()->list();                            // Package[]
$vf->packages()->get(1);                            // Package DTO

// Users
$vf->users()->create(['name' => 'John', 'email' => 'john@example.com']);
$vf->users()->getByExtRelation('100');               // User DTO
$vf->users()->updateByExtRelation('100', ['name' => 'Jane']);
$vf->users()->deleteByExtRelation('100');
$vf->users()->resetPasswordByExtRelation('100');
$vf->users()->authenticationTokens('100');
$vf->users()->serverAuthenticationTokens('100', 69);

// SSH Keys
$vf->sshKeys()->create(1, 'my-key', 'ssh-rsa AAAA...');
$vf->sshKeys()->get(1);                             // SshKey DTO
$vf->sshKeys()->listByUser(1);                      // SshKey[]
$vf->sshKeys()->delete(1);

// IP Blocks
$vf->ipBlocks()->list();                             // PaginatedResponse
$vf->ipBlocks()->get(1);                             // IpBlock DTO
$vf->ipBlocks()->addIpv4Range(1, '10.0.0.10', '10.0.0.20');

// Backups
$vf->backups()->listByServer(69);                    // Backup[]

// DNS
$vf->dns()->getService(1);

// Media
$vf->media()->getIso(1);
$vf->media()->templatesFromPackageSpec(5);

// Queue
$vf->queue()->get(42);

// Self Service
$vf->selfService()->addCredit('100', 50.0);
$vf->selfService()->deleteCredit(1);
$vf->selfService()->currencies();
$vf->selfService()->createResourcePack('100', 5);
$vf->selfService()->getResourcePack(5, withServers: true);
$vf->selfService()->usage('100');
$vf->selfService()->report('100');
$vf->selfService()->hourlyStats('100');
```

Error Handling
--------------

[](#error-handling)

```
use EZScale\VirtFusion\Exceptions\ValidationException;
use EZScale\VirtFusion\Exceptions\RateLimitException;
use EZScale\VirtFusion\Exceptions\NotFoundException;

try {
    $vf->server(999)->get();
} catch (NotFoundException $e) {
    // Server not found
} catch (ValidationException $e) {
    $errors = $e->getErrors(); // field-level errors
} catch (RateLimitException $e) {
    $retryAfter = $e->getRetryAfter(); // seconds
}
```

API Reference
-------------

[](#api-reference)

See the [API Reference](https://github.com/EZSCALE/virtfusion-api-library/blob/main/API_REFERENCE.md) for the complete VirtFusion API specification.

License
-------

[](#license)

MIT — see [LICENSE](../LICENSE).

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance96

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~0 days

Total

2

Last Release

50d ago

### Community

Maintainers

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

---

Top Contributors

[![Prophet731](https://avatars.githubusercontent.com/u/2193906?v=4)](https://github.com/Prophet731 "Prophet731 (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ezscale-virtfusion-php/health.svg)

```
[![Health](https://phpackages.com/badges/ezscale-virtfusion-php/health.svg)](https://phpackages.com/packages/ezscale-virtfusion-php)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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