• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Admin

Well-Known Member
Staff member
Administrator
Code này cho phép bạn backup tất cả thông tin trên cpanel rồi gửi file backup dưới dạng file đính kèm tới email của bạn
PHP:
 // ********* Cai dat thong so *********
// Info required for cPanel access
$cpuser = "username"; // Username used to login to CPanel
$cppass = "password"; // Password used to login to CPanel
$domain = "ten mien"; // Domain name where CPanel is run
$
skin = "x"; //script ko hoat dong neu ko dung skin.Neu su dung host cua wmvn thi la x3// Info required for FTP host
$ftpuser = "ftpusername"; // Username for FTP account
$ftppass = "ftppassword"; // Password for FTP account
$ftphost = "ftp.Ten mien"; // Full hostname or IP address for FTP host
$ftpmode = "ftp"; // FTP mode ("ftp" for active, "passiveftp" for passive)
// Notification information
$notifyemail = "email cua ban"; // Email address to send results
// Secure or non-secure mode
$secure = 0; // Set to 1 for SSL (requires SSL support), otherwise will use standard HTTP
// Set to 1 to have web page result appear in your cron log
$debug = 0;
// **********Khong chinh sua cai dat duoi day.Script edit by choideptb.*********
if ($secure) {
$url = "ssl://".$domain;
$port = 2083;
} else {
$url = $domain;
$port = 2082;
}
$socket = fsockopen($url,$port);
if (!$socket) { echo "Failed to open socket connectionaE| Bailing out!\n"; exit; }
// Encode authentication string
$authstr = $cpuser.":".$cppass;
$pass = base64_encode($authstr);
$params = "dest=$ftpmode&email=$notifyemail&server=$ftphost&user=$ftpuser&pass=$
Bạn sửa rồi lưu code trên thành 1 file fullbackup.php rồi up
lên host ngang hàng với thư mục public_html, public_ftp....
Vào cpanel của bạn->Cron Job ->
Advanced(unix style)
Ổ đây bạn nhập email (file backup sẽ đính kèm tới email này)
Ngày tháng backup
Nhập đường dẫn tới file fullbackup.php
Code:
/usr/local/bin/php/home/ten_tai_khoan_cpanel/fullbackup.php
Thiết lập xong click vào [commit change]
Cái này chưa thử trên cpanel, vistapanel
Code by choideptb WMTVN
 

Facebook Comments

New posts New threads New resources

Back
Top