PHPackages                             privyreza/rm-php-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. privyreza/rm-php-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

privyreza/rm-php-sdk
====================

Resell Domains, Hosting, and VPS

3.0.0(3y ago)2137[1 PRs](https://github.com/privyreza/rm-php-sdk/pulls)MITPHPPHP ^8.0CI failing

Since Jul 6Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/privyreza/rm-php-sdk)[ Packagist](https://packagist.org/packages/privyreza/rm-php-sdk)[ RSS](/packages/privyreza-rm-php-sdk/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (19)Used By (0)

Resellme PHP SDK
================

[](#resellme-php-sdk)

The Resellme PHP SDK provides an easy-to-use interface for interacting with the Resellme API. It allows resellers to manage domains, hosting, VPS, nameservers, and contacts programmatically.

---

Features
--------

[](#features)

- **Domain Management**: Search, register, transfer, and renew domains.
- **Hosting Management**: Create, provision, suspend, unsuspend, update, and terminate hosting accounts.
- **VPS Management**: Create and manage VPS instances.
- **Nameserver Management**: List, update, add, and delete nameservers.
- **Contact Management**: Create, update, and retrieve domain contacts.
- **Centralized Request Handling**: All API requests are handled through a centralized `RequestHandler` for consistency and error handling.

---

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

[](#installation)

Install the SDK via Composer:

```
composer require resellme/rm-php-sdk
```

---

Usage
-----

[](#usage)

### Initialize the Client

[](#initialize-the-client)

```
require 'vendor/autoload.php';

use Resellme\Client;

$client = new Client('your-api-token');
```

---

### Domain Management

[](#domain-management)

#### Search for a Domain

[](#search-for-a-domain)

```
$domain = $client->domain()->search('example.com');
```

#### Register a Domain

[](#register-a-domain)

```
$response = $client->domain()->register([
    'domain' => 'example.com',
    'years' => 1,
    'contact_id' => 'contact-id',
]);
```

#### Transfer a Domain

[](#transfer-a-domain)

```
$response = $client->domain()->transfer([
    'domain' => 'example.com',
    'auth_code' => 'auth-code',
    'contact_id' => 'contact-id',
]);
```

#### Renew a Domain

[](#renew-a-domain)

```
$response = $client->domain()->renew('domain-id', [
    'years' => 1,
]);
```

---

### Hosting Management

[](#hosting-management)

#### Create a Hosting Account

[](#create-a-hosting-account)

```
$response = $client->hosting()->create([
    'domain' => 'example.com',
    'plan' => 'basic',
]);
```

#### List Hosting Accounts

[](#list-hosting-accounts)

```
$hostings = $client->hosting()->list();
```

#### Get Hosting Details

[](#get-hosting-details)

```
$hosting = $client->hosting()->get('hosting-id');
```

#### Update a Hosting Account

[](#update-a-hosting-account)

```
$response = $client->hosting()->update('hosting-id', [
    'plan' => 'premium',
]);
```

#### Suspend a Hosting Account

[](#suspend-a-hosting-account)

```
$response = $client->hosting()->suspend('hosting-id');
```

#### Unsuspend a Hosting Account

[](#unsuspend-a-hosting-account)

```
$response = $client->hosting()->unsuspend('hosting-id');
```

#### Terminate a Hosting Account

[](#terminate-a-hosting-account)

```
$response = $client->hosting()->terminate('hosting-id');
```

---

### VPS Management

[](#vps-management)

#### Create a VPS

[](#create-a-vps)

```
$response = $client->vps()->create([
    'package_id' => 1,
    'hostname' => 'vps.example.com',
]);
```

#### Manage a VPS

[](#manage-a-vps)

```
$response = $client->vps()->manage('vps-id', 'reboot');
```

---

### Nameserver Management

[](#nameserver-management)

#### List Nameservers

[](#list-nameservers)

```
$nameservers = $client->nameserver()->list('domain-id');
```

#### Update Nameservers

[](#update-nameservers)

```
$response = $client->nameserver()->update('domain-id', [
    'ns1.example.com',
    'ns2.example.com',
]);
```

#### Add a Nameserver

[](#add-a-nameserver)

```
$response = $client->nameserver()->add('domain-id', 'ns3.example.com');
```

#### Delete a Nameserver

[](#delete-a-nameserver)

```
$response = $client->nameserver()->delete('domain-id', 'ns3.example.com');
```

---

### Contact Management

[](#contact-management)

#### Create a Contact

[](#create-a-contact)

```
$response = $client->contact()->create([
    'first_name' => 'John',
    'last_name' => 'Doe',
    'email' => 'john.doe@example.com',
    'phone' => '+1234567890',
    'address' => '123 Main St',
    'city' => 'Example City',
    'country' => 'US',
]);
```

#### Update a Contact

[](#update-a-contact)

```
$response = $client->contact()->update('contact-id', [
    'email' => 'new.email@example.com',
]);
```

#### Get Contact Details

[](#get-contact-details)

```
$contact = $client->contact()->get('contact-id');
```

---

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

[](#error-handling)

The SDK throws exceptions for API errors. You can catch and handle these exceptions as follows:

```
use Resellme\Exceptions\ApiException;
use Resellme\Exceptions\ServerException;

try {
    $domain = $client->domain()->search('example.com');
} catch (ApiException $e) {
    echo "API Error: " . $e->getMessage();
} catch (ServerException $e) {
    echo "Server Error: " . $e->getMessage();
} catch (\Exception $e) {
    echo "Unexpected Error: " . $e->getMessage();
}
```

---

Testing
-------

[](#testing)

Run unit tests using PHPUnit:

```
vendor/bin/phpunit
```

---

Contributing
------------

[](#contributing)

1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Submit a pull request with a detailed description of your changes.

---

License
-------

[](#license)

This SDK is licensed under the MIT License. See the `LICENSE` file for details.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance54

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 86.8% 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 ~55 days

Recently: every ~9 days

Total

16

Last Release

1310d ago

Major Versions

1.5.0 → 2.0.02022-01-06

2.1.4 → 3.0.02022-10-09

PHP version history (3 changes)1.0.0PHP ^7.2

3.0.0PHP ^8.0

2.1.5PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/01d6bd73cba44267868e105cf0a8c00a53041234b8ddc5ad8cfc2861219e6c3e?d=identicon)[privyreza](/maintainers/privyreza)

---

Top Contributors

[![privyreza](https://avatars.githubusercontent.com/u/20134879?v=4)](https://github.com/privyreza "privyreza (33 commits)")[![resellme](https://avatars.githubusercontent.com/u/97063491?v=4)](https://github.com/resellme "resellme (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/privyreza-rm-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/privyreza-rm-php-sdk/health.svg)](https://phpackages.com/packages/privyreza-rm-php-sdk)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[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)
