PHPackages                             cmantito/whmcs-php - 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. cmantito/whmcs-php

ActiveLibrary[API Development](/categories/api)

cmantito/whmcs-php
==================

PHP class for interacting with the WHMCS API.

v3.5(10y ago)924613[2 PRs](https://github.com/cmantito/whmcs-php/pulls)PHPPHP &gt;=5.3.0

Since Apr 8Pushed 9y ago5 watchersCompare

[ Source](https://github.com/cmantito/whmcs-php)[ Packagist](https://packagist.org/packages/cmantito/whmcs-php)[ RSS](/packages/cmantito-whmcs-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (17)Used By (0)

\#whmcs-php

This is a simple class which allows you to interact with the WHMCS API using PHP.

\##Installation

This is now available via composer, and can be included by creating a file called composer.json in the root with the contents:

```
{
    "name": "you/yourappname",
    "description": "Your app description",
    "version": "1.0",
    "homepage": "http://www.yoursite.tld",
	"require": {
	   "cmantito/whmcs-php": "dev-master"
	}
}

```

Then you can run `php /path/to/composer.phar install` to install it, assuming you've installed composer. See  for info. Alternatively, clone the repository and use `require_once 'whmcs.class.php';` if you do not use composer.

\##Setup

```
$whmcs = new WHMCS('https://whmcs-example.com/includes/api.php', 'api-user', 'password', 'optional-access-key');

```

The URL should point to your WHMCS install's `api.php` file (usually in `includes/`). `api-user` is the username of the WHMCS administrator the API will be using, and `password` should be that user's password. If you are using the API access key instead of IP-filtering with WHMCS, specify the access key as well (`optional-access-key`), otherwise, leave it off/null. (For more information about the access key, see [http://docs.whmcs.com/API:Access\_Keys](http://docs.whmcs.com/API:Access_Keys))

\##Return

Functions will return a PHP stdClass object with the results retrieved from WHMCS, unless an error is encountered. If WHMCS returns an error, a WhmcsException will be thrown; If CURL encounters an issue connecting (resolution errors, 404, etc), a standard Exception will be thrown. In most cases, WHMCS treats no results as an error condition itself, which will throw a WhmcsException; WHMCS is not very consistent however, so this may not always be the case :o)

\##Todo

This is mostly being developed inline with a project for Cadence Networks. As a result most of the functionality is being implemented in the order I need it, which is not necessarily this order:

- Client Management: update domain, upgrade product, send email.

Down the line:

- Client Management: update/delete/get contacts - addContact has recently been added by @hdlopes.

Never (unless someone else submits a pull request for it).

- Support tickets. WHMCS's excuse for support tickets is terrible, and you shouldn't use it. No one should. 0:)

---

~ Kat,  // Cadence Networks:

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~42 days

Recently: every ~76 days

Total

16

Last Release

3787d ago

Major Versions

v2.9 → v3.02015-02-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/294ec023d3cbcf2c42eb3558b0d0bf034e5b616932d1feeb34575ae77eb40dbb?d=identicon)[cmantito](/maintainers/cmantito)

---

Top Contributors

[![tomvlk](https://avatars.githubusercontent.com/u/3877688?v=4)](https://github.com/tomvlk "tomvlk (2 commits)")[![MaximusFT](https://avatars.githubusercontent.com/u/587509?v=4)](https://github.com/MaximusFT "MaximusFT (1 commits)")

### Embed Badge

![Health badge](/badges/cmantito-whmcs-php/health.svg)

```
[![Health](https://phpackages.com/badges/cmantito-whmcs-php/health.svg)](https://phpackages.com/packages/cmantito-whmcs-php)
```

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