PHPackages                             bitlaunchio/phpbitlaunch - 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. bitlaunchio/phpbitlaunch

ActiveLibrary[API Development](/categories/api)

bitlaunchio/phpbitlaunch
========================

PHPBitLaunch is a PHP client library for accessing the BitLaunch API.

22.2k↓50%1PHP

Since Jun 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BitLaunchIO/phpbitlaunch)[ Packagist](https://packagist.org/packages/bitlaunchio/phpbitlaunch)[ RSS](/packages/bitlaunchio-phpbitlaunch/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHPBitLaunch
============

[](#phpbitlaunch)

PHPBitLaunch is a PHP client library for accessing the BitLaunch API.

You can view BitLaunch API docs here:

Install
-------

[](#install)

```
composer require "bitlaunchio/phpbitlaunch"
```

Usage
-----

[](#usage)

```
require_once('vendor/autoload.php');

// Create a PHPBitLaunch Client
$client = new PHPBitLaunch\Client('API_KEY');
```

### Account

[](#account)

#### Show

[](#show)

Show account details

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $account = $client->account()->show();
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Usage

[](#usage-1)

Show account usage

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $usage = $client->account()->usage('2022-01');
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### History

[](#history)

Show account activity

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $history = $client->account()->history(1, 20);
} catch (RuntimeException $e) {
    // Handle Error
}
```

### Create Options

[](#create-options)

#### Show

[](#show-1)

Show create options for a host

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $opts = $client->createOptions()->show(4);
} catch (RuntimeException $e) {
    // Handle Error
}
```

### SSH Key

[](#ssh-key)

#### Create

[](#create)

Add an SSH key

```
use \PHPBitLaunch\Exceptions\RuntimeException;

$keyName = 'My SSH Key';
$keyContent = 'ssh-rsa AAA......';

try {
    $key = $client->sshKey()->create($keyName, $keyContent);
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### List

[](#list)

List the SSH keys

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $keys = $client->sshKey()->list();
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Delete

[](#delete)

Delete an SSH key

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $client->sshKey()->delete('aaaaaaaaaaabbbbbbbbbbbbb');
} catch (RuntimeException $e) {
    // Handle Error
}
```

### Transaction

[](#transaction)

#### Create

[](#create-1)

Create a new transaction

```
use \PHPBitLaunch\Exceptions\RuntimeException;

$amountUsd = 20;
$cryptoSymbol = 'BTC';

try {
    $transaction = $client->transaction()->create($amountUsd, $cryptoSymbol);
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### List

[](#list-1)

List the transaction history

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $transactions = $client->transaction()->list(1, 25);
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Show

[](#show-2)

Show a transaction

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $transaction = $client->transaction()->show('aaaaaaaaaaabbbbbbbbbbbbb');
} catch (RuntimeException $e) {
    // Handle Error
}
```

### Server

[](#server)

#### Create

[](#create-2)

Create a server

```
use \PHPBitLaunch\Exceptions\RuntimeException;

$opts = new \PHPBitLaunch\Types\ServerCreateOptions([
    'name' => 'My Server',
    'hostID' => 4,
    'hostImageID' => '10002',
    'sizeID' => 'nibble-1024',
    'regionID' => 'ams1',
    'password' => 'secure_password',
]);

try {
    $server = $client->server()->create($opts);
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### List

[](#list-2)

List your servers

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $servers = $client->server()->list();
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Show

[](#show-3)

Show a server

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $server = $client->server()->show('aaaaaaaaaaabbbbbbbbbbbbb');
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Destroy

[](#destroy)

Destroy a server

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $client->server()->destroy('aaaaaaaaaaabbbbbbbbbbbbb');
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Rebuild

[](#rebuild)

Rebuild a servers image

```
use \PHPBitLaunch\Exceptions\RuntimeException;

$hostImageID = '12001';
$imageDescription = 'Debian 10';

try {
    $client->server()->rebuild('aaaaaaaaaaabbbbbbbbbbbbb', $hostImageID, $imageDescription);
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Resize

[](#resize)

Resize a server

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $client->server()->resize('aaaaaaaaaaabbbbbbbbbbbbb', 'nibble-2048');
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Restart

[](#restart)

Restart a server

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $client->server()->restart('aaaaaaaaaaabbbbbbbbbbbbb');
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Stop

[](#stop)

Stop a server

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $client->server()->stop('aaaaaaaaaaabbbbbbbbbbbbb');
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Protect

[](#protect)

Enable/Disable protection for a server

```
use \PHPBitLaunch\Exceptions\RuntimeException;

try {
    $server = $client->server()->protect('aaaaaaaaaaabbbbbbbbbbbbb', true);
} catch (RuntimeException $e) {
    // Handle Error
}
```

#### Set Ports

[](#set-ports)

Set the ports to use for protection

```
use \PHPBitLaunch\Exceptions\RuntimeException;

$ports = [
    new \PHPBitLaunch\Types\Port([
        'portNumber' => 1234,
        'protocol' => 'tcp',
    ]),
    new \PHPBitLaunch\Types\Port([
        'portNumber' => 1235,
        'protocol' => 'tcp',
    ]),
];

try {
    $server = $client->server()->setPorts('aaaaaaaaaaabbbbbbbbbbbbb', $ports);
} catch (RuntimeException $e) {
    // Handle Error
}
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity22

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/63351911?v=4)[BitLaunch](/maintainers/BitLaunchIO)[@BitLaunchIO](https://github.com/BitLaunchIO)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/bitlaunchio-phpbitlaunch/health.svg)

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

###  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)
