PHP code example of mythicalsystems / aapanelapi

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

    

mythicalsystems / aapanelapi example snippets




use mythicalsystems\aapanel\aapanel_api;

$aapanel = new aapanel_api();

$aapanel->key = 'YOUR_API_KEY';
$aapanel->url = 'YOUR_AAPANEL_IP_AND_PORT';



$aapanel->addSite($domain, $path, $desc, $type_id = 0, $type = 'php', $phpversion = '73', $port = '80', $ftp = null, $ftpusername = null, $ftppassword = null, $sql = null, $userdbase = null, $passdbase = null, $setSsl = 0, $forceSsl = 0);



$aapanel->modifySubDomain($subdomain, $mainDomain, $iptarget, $id)


$aapanel->unzip($sourcefilepath,$destinationpath,$password = null);



$aapanel->applySSL($domain, $id_site);



$aapanel->siteList($limit,$page,$projectType,$search = null);



$aapanel->disableSite($id_site,$domain);



$aapanel->enableSite($id_site,$domain);



$aapanel->importDbase($file, $dbasename);