Location: PHPKode > scripts > Cpanel cURL Backup > example.php
<?php
	//Warning:  This script contains passwords.  KEEP ACCESS TO THIS FILE SECURE! (place it in your home dir)

	//################# Usage Example ###################
	require_once "cpanel.backup.class.php";
	
	$CpanelObject = new CpanelBackup();	
	
	//CPanel Username
	$CpanelObject->cpanel_user = "cpanel_user"; 
	
	//CPanel Password
	$CpanelObject->cpanel_pass = "cpanel_password";

	//CPanel Domain Name
	$CpanelObject->domain = "miledino.ro"; 
	
	//CPanel backup Home dir set it to TRUE if you wanna backup the home dir of the site
	$CpanelObject->home_dir_backup = TRUE;
	
	//Set the name of the databases
	$database[]="database_name_1";
	$database[]="database_name_2";
	$CpanelObject->databases = $database;
	
	//Store locations of the backup files. Make sure that you have permission
	$CpanelObject->backup_store_location = "C:\\backups\\"; 
	
	//Log in to cpanel
	$CpanelObject->cpanel_login();	
	
	//Execute backup
	$CpanelObject->save_cpanel_backup();	
?>
Return current item: Cpanel cURL Backup