github-aiko / php-virtualizor
A Wrapper for the Virtualizor API
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/github-aiko/php-virtualizor
Requires
- php: ^7.4|^8.0
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^9.5|^10.0
This package is auto-updated.
Last update: 2025-12-31 17:08:34 UTC
README
๐ฅ๏ธ PHP Virtualizor API Wrapper
A modern, elegant PHP wrapper for the Virtualizor API
๐ Table of Contents
- โจ Features
- ๐ฆ Requirements
- ๐ Installation
- โก Quick Start
- ๐ API Reference
- ๐งช Development
- ๐ค Contributing
- ๐ License
โจ Features
| Feature | Description |
|---|---|
| ๐ฅ๏ธ Virtual Servers | Create, manage, start, stop, restart VPS instances |
| ๐พ OS Templates | List and manage operating system templates |
| ๐ IP Pool | Manage IP address pools and allocations |
| ๐ฅ Users | User management and authentication |
| ๐ Secure | Built-in API key authentication |
| โก Modern PHP | Supports PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 |
๐ฆ Requirements
- PHP >= 7.4
- ext-json extension
- Virtualizor panel with API access enabled
๐ Installation
Install via Composer:
composer require github-aiko/php-virtualizor
โก Quick Start
Initialize the Client
<?php require 'vendor/autoload.php'; use Virtualizor\Virtualizor; // Initialize with your Virtualizor credentials $virtualizor = new Virtualizor( 'your-server-ip', // Server IP 'your-api-key', // API Key 'your-api-pass', // API Password '4085', // Admin Port (default: 4085) '4083' // Client Port (default: 4083) );
Virtual Server Management
// Get VirtualServer instance $server = $virtualizor->server(); // List all virtual servers $servers = $server->listAll(); // Get specific VPS info $vpsInfo = $server->info($vpsId); // Start/Stop/Restart VPS $server->start($vpsId); $server->stop($vpsId); $server->restart($vpsId);
OS Templates
// Get OS Templates instance $templates = $virtualizor->osTemplates(); // List all available templates $allTemplates = $templates->listAll();
IP Pool Management
// Get IP Pool instance $ipPool = $virtualizor->IPPool(); // List all IP pools $pools = $ipPool->listAll();
User Management
// Get Users instance $users = $virtualizor->Users(); // List all users $allUsers = $users->listAll();
๐ API Reference
Main Class: Virtualizor
| Method | Return Type | Description |
|---|---|---|
server() |
VirtualServer |
Virtual server operations |
osTemplates() |
OSTemplates |
OS template operations |
IPPool() |
IPPool |
IP pool operations |
Users() |
Users |
User management operations |
๐ Full Documentation: Virtualizor Admin API
๐งช Development
Running Tests
# Install dependencies composer install # Run PHPUnit tests vendor/bin/phpunit
CI/CD Pipeline
This project uses GitHub Actions for continuous integration:
| Check | Versions |
|---|---|
| ๐งช Unit Tests | PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 |
| โ Composer Validation | All versions |
| ๐ฆ Auto Packagist Update | On release tags |
๐ค Contributing
Contributions are welcome! Here's how you can help:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/amazing-feature) - ๐พ Commit your changes (
git commit -m 'Add amazing feature') - ๐ค Push to the branch (
git push origin feature/amazing-feature) - ๐ Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with โค๏ธ by Github-Aiko
Based on VirtualizorPHP - completely recoded