1. Go to this page and download the library: Download darthsoup/php-whmcs-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
darthsoup / php-whmcs-api example snippets
ent = new \DarthSoup\WhmcsApi\Client();
// Authenticate with API identifier and secret
$client->authenticate('your_identifier', 'your_secret', \DarthSoup\WhmcsApi\Client::AUTH_API_CREDENTIALS);
// Or authenticate with login credentials (username and password, plain text)
$client->authenticate('your_username', 'your_password', \DarthSoup\WhmcsApi\Client::AUTH_LOGIN_CREDENTIALS);
// Set the URL to your WHMCS instance
$client->url('https://<your_whmcs_instance_url>');
$client = new \DarthSoup\WhmcsApi\Client();
$client->authenticate('your_identifier', 'your_secret', \DarthSoup\WhmcsApi\Client::AUTH_API_CREDENTIALS);
$client->accessKey('your_access_key');
$client->url('https://<your_whmcs_instance_url>');