1. Go to this page and download the library: Download gohrco/whmcsapi 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/ */
gohrco / whmcsapi example snippets
use Gohrco\Whmcsapi;
// create an API handler
$api = new Whmcsapi();
// Set options
$api->setUsername( 'apiadmin' );
$api->setPassword( 'password' );
$api->setUrl( 'http://url.to.your/whmcs/' );
$api->setLogpath( '\absolute\path\to\log\entries' );
// Init
$api->init();
// Call API up
$result = $api->getclientsdetails( array( 'userid' => 1 ) );