1. Go to this page and download the library: Download ayowande/cpanel-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/ */
ayowande / cpanel-api example snippets
use ayowande\Cpanel\Cpanel;
$cpanel = new Cpanel(
'example.com', // cPanel server hostname
'username', // cPanel username
2083, // Port (usually 2083 for SSL)
'your-api-token' // cPanel API token
);