PHP code example of gkimani / cyberpanel

1. Go to this page and download the library: Download gkimani/cyberpanel 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/ */

    

gkimani / cyberpanel example snippets


// replace the class Website with either: 

--> Ftp, User, Package, ChildDomain, Email, Database, Dns, Backup

$cyberPanelClient = new Website('https://panel.cyberpanel.net', 'admin', 'password');
$response = $cyberPanelClient->createWebsite(
        'admin', 
        'cyberpanel.net',
        'Default',
        '[email protected]',
        'PHP 8.1',
        'admin',
        0,
        0,
        0
);

// $response handles exceptions for errors that occur during HTTP requests