| 
<?php
 include "database_backup_class.php";
 
 $obj = new database_backup_class();
 
 $dbhost = "localhost";  // Define database Host
 $dbuser = "root";      // Define database username
 $dbpwd = "root";         // Define database password
 $dbname = "database";  // Define database name
 
 $ftp_host = ""; // Define FTP hostname to which database dump upload
 $ftp_username = ""; // Define FTP username to which database dump upload
 $ftp_pass = ""; // Define FTP password to which database dump upload
 
 $obj->set_property("dbhost",$dbhost); // set database host name which we want to dump
 $obj->set_property("dbuser",$dbuser); // set databse useraname
 $obj->set_property("dbpwd",$dbpwd); // set database password
 $obj->set_property("dbname",$dbname); // set database name which we want to dump
 
 $filename = $obj->get_database_dump();
 
 $destination_path = "/public_html/";  // Destination path of ftp server to which we want to upload our database dump
 
 $obj->set_property("ftp_host",$ftp_host);  // set FTP host name
 $obj->set_property("ftp_username",$ftp_username);  // set FTP username
 $obj->set_property("ftp_pass",$ftp_pass);  // set FTP password
 
 $obj->upload_to_ftp($destination_path,$filename);
 
 $sender_email = "";  // add sender email here
 
 $reciever_email = ""; // add receiver email here
 
 $obj->set_property("sender_email",$sender_email);
 $obj->set_property("reciever_email",$reciever_email);
 
 $send = $obj->mail_backup($filename);
 echo $send;
 ?>
 
 |