PHPackages                             virtualine-net/php-client - 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. virtualine-net/php-client

ActiveLibrary[API Development](/categories/api)

virtualine-net/php-client
=========================

Virtualine.net API Client

1.0.1(11mo ago)06MITPHPPHP &gt;=7.4

Since Jun 16Pushed 11mo agoCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

Virtualine PHP Client
=====================

[](#virtualine-php-client)

[![PHP Version](https://camo.githubusercontent.com/6eff5053a32c9e0bcc0982c4f118ef689cad7831a3d982767aae3901bf67313c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e342d626c75652e737667)](https://php.net)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![Packagist](https://camo.githubusercontent.com/6cd7b0f289ea546fad5e4cfcbcd32b93daa2882861940ff7c056516253894e01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7669727475616c696e652d6e65742f7068702d636c69656e742e737667)](https://packagist.org/packages/virtualine-net/php-client)

 [![Virtualine Logo](https://camo.githubusercontent.com/19ef107c7a8bbe0323a868aae5301bd7b9e6e037c4e36ebb25a5c4888deb2b59/68747470733a2f2f7669727475616c696e652e6e65742f6173736574732f696d672f4c696768744c6f676f2e676966)](https://camo.githubusercontent.com/19ef107c7a8bbe0323a868aae5301bd7b9e6e037c4e36ebb25a5c4888deb2b59/68747470733a2f2f7669727475616c696e652e6e65742f6173736574732f696d672f4c696768744c6f676f2e676966)

PHP client library for interacting with the Virtualine API. This library provides a simple and efficient way to manage virtual servers and services through the Virtualine platform.

Features
--------

[](#features)

- Simple API authentication using API key and email
- Credit balance management
- Product listing and management
- Virtual server operations:
    - Create new services
    - Start/Stop/Reboot servers
    - Change passwords
    - Terminate services
    - Suspend/Unsuspend services
    - Reinstall templates
    - Get WMSK URLs
- Service information and details retrieval
- Connection testing

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

[](#requirements)

- PHP 7.4 or higher
- Composer
- Virtualine HTTP Client

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

[](#installation)

You can install the library via Composer:

```
composer require virtualine-net/php-client
```

Usage
-----

[](#usage)

### Basic Setup

[](#basic-setup)

```
use Virtualine\VirtualineClient;

// Initialize the client with your API credentials
$client = new VirtualineClient('your-api-key', 'your-email');

// Test the connection
if ($client->testConnection()) {
    echo "Successfully connected to Virtualine API";
}
```

### Creating a New Service

[](#creating-a-new-service)

```
// Create a new service with detailed configuration
$result = $client->createService($productId, [
    'cycle' => "monthly",
    'hostname' => "service.virtualine.net",
    'username' => "root",
    'password' => "password",
    'nsprefix[]' => 'ns1',
    'nsprefix[]' => 'ns2',
    'configurations[Operating System]' => 1
]);

if ($result) {
    echo "Service created successfully!";
} else {
    echo "Failed to create service.";
}
```

### Managing Services

[](#managing-services)

```
// Get available products
$products = $client->getProducts();

// Get service details
$serviceDetails = $client->getServiceDetails('service-id');

// Manage service state
$client->start('service-id');
$client->stop('service-id');
$client->reboot('service-id');

// Change service password
$client->changePassword('service-id', 'new-password');

// Reinstall service
$client->reinstall('service-id', 'template-id', 'new-password');
```

### Billing and Credits

[](#billing-and-credits)

```
// Check credit balance
$creditBalance = $client->getCredit();
```

API Methods
-----------

[](#api-methods)

### Authentication

[](#authentication)

- `__construct(string $apiKey, string $email)` - Initialize the client with API credentials

### Connection

[](#connection)

- `testConnection(): bool` - Test the API connection

### Billing

[](#billing)

- `getCredit(): float` - Get current credit balance

### Products

[](#products)

- `getProducts(): array` - Get list of available products

### Services

[](#services)

- `getServiceDetails(string $serviceId): array` - Get detailed information about a service
- `getInfo(string $serviceId): array` - Get service information
- `createService(string $productId, array $params): array|false` - Create a new service
- `start(string $serviceId): array|false` - Start a service
- `stop(string $serviceId): array|false` - Stop a service
- `reboot(string $serviceId): array|false` - Reboot a service
- `changePassword(string $serviceId, string $password): array|false` - Change service password
- `terminate(string $serviceId): array|false` - Terminate a service
- `suspend(string $serviceId): array|false` - Suspend a service
- `unsuspend(string $serviceId): array|false` - Unsuspend a service
- `renew(string $serviceId): array|false` - Renew a service
- `reinstallTemplates(string $serviceId): array` - Get available reinstall templates
- `reinstall(string $serviceId, string $templateId, string $password): array|false` - Reinstall a service
- `getWMKSUrl(string $serviceId): string|false` - Get WMSK URL for a service
- `ssoLogin(string $serviceId): string|false` - Get SSO login URL for a service

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

[](#error-handling)

The client throws exceptions in case of errors:

- `InvalidArgumentException` - When required parameters are missing
- `RuntimeException` - When API requests fail

Support
-------

[](#support)

For support, please contact Virtualine support team or create an issue in the repository.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Authors
-------

[](#authors)

- Virtualine.net Team

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance52

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

Total

2

Last Release

335d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13381cd80ce6c89c16b61371fc00d0c47777c2bf0d2232eaf19785baf5d33784?d=identicon)[virtualine-dev](/maintainers/virtualine-dev)

---

Top Contributors

[![virtualine-dev](https://avatars.githubusercontent.com/u/216543293?v=4)](https://github.com/virtualine-dev "virtualine-dev (2 commits)")

### Embed Badge

![Health badge](/badges/virtualine-net-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/virtualine-net-php-client/health.svg)](https://phpackages.com/packages/virtualine-net-php-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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