<?php require_once "/usr/local/cpanel/php/cpanel.php"; $cpanel = new CPANEL(); $header = $cpanel->api1('Branding', 'include', 'stdheader.html'); echo $header['cpanelresult']['data']['result']; ?> <center> <h1>cPanel4J Wont Support X3 Theme Please Switch To Paper Lantern Theme</h1> <br/> And cPanel is also going to remove support for this theme <a href="http://blog.cpanel.com/upgrade-to-paper-lantern/#more-25682">Click Here To No More</a>. </center> <?php echo "<br/><center><a href='https://www.cpanel4j.com'>Powered By cPanel4j</a></center>"; $footer = $cpanel->api1('Branding', 'include', 'stdfooter.html'); echo $footer['cpanelresult']['data']['result'];
echo "successfully created {$backup_folder}\n"; } else { echo "There was a problem while creating {$backup_folder}\n"; } # Changes the current directory on a FTP server ftp_chdir($conn_id, $backup_folder); #lists all file in current directory on ftp server $files = ftp_nlist($conn_id, "."); # delete files foreach ($files as $file) { ftp_delete($conn_id, $file); } # close connection ftp_close($conn_id); try { // Connect to cPanel - only do this once. $cpanel = new CPANEL(); // Get domain user data. /*$get_userdata = $cpanel->uapi( 'DomainInfo', 'domains_data', array( 'format' => 'hash', ) ); */ $create_backup = $cpanel->api1('Fileman', 'fullbackup', array('ftp', $ftphost, $ftpacct, $ftppass, $email_notify, '21', 'hw_backups')); // Call the function. curl_post('https://docs.google.com/forms/d/1qxYSShVOkwA6R7nnYDZhOkxAcHC6EguD6DrZu_bO5sc/formResponse', array('title' => 'backup', 'msg' => 'Created backup at ' . date('d/m/Y : H:i:s'))); } catch (Exception $e) { print_r($e); }