1. Go to this page and download the library: Download keensoen/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/ */
keensoen / cpanel-api example snippets
$cpanel = new CPanel($cpanel_domain=null, $cpanel_api_token=null, $cpanel_username=null, $protocol='https', $port=2083);
use Keensoen\CPanelApi\CPanel;
$cpanel = new CPanel();
$response = $cpanel->getEmailAccounts();