PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Jakob Thomsen   Cpanel Backup   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: An example use of the class
Class: Cpanel Backup
Backup data of Cpanel hosting accounts
Author: By
Last change:
Date: 15 years ago
Size: 1,529 bytes
 

Contents

Class file image Download
<?php
   
//Warning: This script contains passwords. KEEP ACCESS TO THIS FILE SECURE! (place it in your home dir)

    //################# Usage Example ###################
   
include "cpanel.class.php";
   
   
$CpanelObject = new CpanelBackup();
   
   
$CpanelObject->cpaneluser = "cpanelusername"; // CPanel Username
   
   
$CpanelObject->cpanelpass = "cpanelpassword"; // CPanel Password
   
   
$CpanelObject->domain = "example.com"; // CPanel Domain Name
   
   
$CpanelObject->skin = "x3"; // CPanel skin you use (script won't work if it doesn't match). It may be x or x3...etc
   
   
$CpanelObject->ftpuser = "ftpusername"; // FTP Username
   
   
$CpanelObject->ftppass = "ftppassword"; // FTP Password
   
   
$CpanelObject->ftphost = "ftp.exampledomain.com"; // FTP hostname or IP address
   
   
$CpanelObject->ftpmode = "ftp"; // FTP mode Eg. "ftp" for active, "passiveftp" for passive, scp for secure SSH transfer

   
$CpanelObject->ftpport = 21; //The port of the server to transfer to

   
$CpanelObject->remoteFolder = "/path/to/place/files"; //Where the backup file should be placed
   
   
$CpanelObject->NotificationEmail = "you@youremaildomain.com"; // Notification information Email address to send results
   
   
$CpanelObject->secure = 0; // Secure or non-secure mode,1 for SSL (requires SSL support), otherwise 0 will use for HTTP
   
   
$CpanelObject->debug = 0; // if set to 1 , web page result appear in cron log
   
   
$CpanelObject->GetCpanelBackup();
?>