PHP code example of detain / cloudlinux-licensing

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

    

detain / cloudlinux-licensing example snippets


use Detain\Cloudlinux\Cloudlinux;

$cloudlinux = new Cloudlinux('API Username', 'API Password');

foreach ($cl->reconcile() as $license)
	echo $license['IP'].' is type '.$license['TYPE'].'. server registered in CLN with license: '.var_export($license['REGISTERED'], true) . "\n";