1. Go to this page and download the library: Download acl-solution/rh-dependency 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/ */
acl-solution / rh-dependency example snippets
$api = new \ACL\RH\Dependency\Provider('https://example.com/whmcs/installation/url/', 'myusername', 'mypassword');
try {
$result = $api->acceptOrder([
'orderid' => 123,
'serverid' => 456,
//...
]);
} catch (\HansAdema\WhmcsSdk\RequestException $e) {
echo "Error connecting to WHMCS: ".$e->getMessage();
} catch (\HansAdema\WhmcsSdk\ResponseException $e) {
echo "There was an issue with your API call: ".$e->getMessage();
}