PHPackages                             thepublicgood/names - 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. thepublicgood/names

ActiveLibrary[API Development](/categories/api)

thepublicgood/names
===================

API client for domains.co.za resellers.

10PHP

Since Feb 12Pushed 3y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![Tests](https://github.com/tpg/names/actions/workflows/tests.yml/badge.svg)](https://github.com/tpg/names/actions/workflows/tests.yml)

PHP client for the domains.co.za reseller API.
==============================================

[](#php-client-for-the-domainscoza-reseller-api)

A full-featured PHP client for working with the domains.co.za reseller API. This is brand new and is a work in progress. It should not be used in production. It is likely to change significantly before reaching version 1.0.

You will need to have an active domains.co.za reseller account. You will need to provide your username and password to generate a new authentication token, or if you already have a token, you can provide that instead. Note that the library does not support 2 factor authentication.

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

[](#installation)

There are no versions just yet, so you will need to make sure your `composer.json` file has `"minimum-stability": "dev"` set.

The Names library is not bound to any HTTP client library and you can install any PSR-7, PST-17 and PSR-18 compatible library. A good start could be:

```
composer require thepublicgood/names guzzlehttp/guzzle php-http/guzzle7-adapter
```

Usage
-----

[](#usage)

Create a new instance of the `Names` class and pass in your token if you have one. Otherwise, you can pass your username and password to the `authenticate` method:

```
$names = new \TPG\Names\Names(token: $token);

// or

$names = new \TPG\Names\Names();
$auth = $names->authenticate($username, $password);

$token = $auth->token;
```

Reseller Object
---------------

[](#reseller-object)

Many responses will included a `Reseller` object:

```
$reseller = $response->reseller;

$reseller->username;        // string
$reseller->balance;         // float
$reseller->accountType;     // string
$reseller->lowBalance;      // bool
```

Domains
-------

[](#domains)

### Checking if a domain is available

[](#checking-if-a-domain-is-available)

```
$check = $names->domains()->check('is-this-available.com');

$check->requiresEpp;    // bool
$check->isAvailable;    // bool
$check->eppKey;         // string
$check->tld;            // string
$check->sld;            // string
$check->isPremium;      // bool
$check->reseller;       // Reseller object
```

### Getting a list of registered domains

[](#getting-a-list-of-registered-domains)

```
$list = $names->domains()->list();

// or

// Get a list of expired domains
$names->domains()->expired();

// Get a list of domains expiring next month
$names->domains()->expiringNextMonth();

// Get a list of suspended domains
$names->domains()->suspended();

// Get a list of domains currently in redemption
$names->domains()->redemption();
```

Each domain returned is a `Domain` object:

```
$domain = $names->domains()->list()->first();

$domain->name;              // string
$domain->contactName;       // string
$domain->contactId;         // string
$domain->status;            // string
$domain->eppStatus;         // string
$domain->premiumDns;        // bool
$domain->createdAt;         // Carbon
$domain->expiresAt;         // Carbon
$domain->redemptionDate;    // Carbon
$domain->deletionDate;      // Carbon
$domain->autoRenew;         // bool
$domain->externalReference; // string
$domain->nameservers;       // array
```

Credits
-------

[](#credits)

- [Warrick Bayman](https://github.com/warrickbayman)

License
-------

[](#license)

The MIT License (MIT). See the LICENSE.md file for more details.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity23

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://www.gravatar.com/avatar/89ea2dc12cd0a934de60705f8cfe47397095d842121b7d5f545dc9d1cee554ec?d=identicon)[warrickbayman](/maintainers/warrickbayman)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/thepublicgood-names/health.svg)

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

###  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)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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