Hey Guys,After Search From Many Days I Got It Few Days Ago,A Backup Solution,Which Backup Vbulletin Database Everyday,This Is The Link Of That Plugin:
Now What You Need To Do Is? Auto Upload It To Some Host.Now I Am Providing It,Just Change Some Values,And You Are Done;
But Dont Forget: In Which Folder Your Backup File Will Be Stored,Change It To 777.
if server not supported gzip then change it:
To:
And Add That Command To Cron: Run It Everyday (As You Need)
example:
If Any Problem Occur Reply Here,Say Thanks If You Think I deserve It!
Code:
https://rapidshare.com/files/925626244/Auto-backup.zip
Now What You Need To Do Is? Auto Upload It To Some Host.Now I Am Providing It,Just Change Some Values,And You Are Done;
But Dont Forget: In Which Folder Your Backup File Will Be Stored,Change It To 777.
PHP:
<?php
$dir = 'full patch to directory'; // like /public_html/warezrocker.info/backup //
function filelist($dir)
{
$results = array();
$handler = opendir($dir);
while ($file = readdir($handler))
{
if (strrchr($file,'.')!="")
{
$ext=strtolower(strrchr($file,'.'));
}
if ($file != '.' && $file != '..')
{
$results[] = $file;
}
}
closedir($handler);
sort($results);
return $results;
}
function sCurl($url, $post)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$page = curl_exec ($ch);
curl_close ($ch);
return $page;
}
function uploadtors($filelocation)
{
$ursuser = ""; // Add Rapidshare Username //
$urspass = ""; // Add Rapidshare password //
$upservid = file_get_contents('http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=nextuploadserver');
$url_action = "http://rs{$upservid}.rapidshare.com/cgi-bin/rsapi.cgi";
$postdata= array();
$postdata['sub'] = 'upload';
$postdata['login'] = $ursuser;
$postdata['password'] = $urspass;
$postdata['filecontent'] = "@$filelocation";
$page = sCurl($url_action, $postdata);
preg_match('@COMPLETE\n(\d+),([^,]+)@i', $page, $link);
$link = 'https://rapidshare.com/files/' . $link[1] . '/' . $link[2];
if (($link[1] != '') && ($link[2] != ''))
{
unlink($filelocation);
$email = ''; // Add Email Id Where You Want To Receive Download Link //
$headers .= 'From: WarezRocker.info <db@warezrocker.info>' . "\r\n";
$subject = 'DB Uploaded'; // Add Subject Of That Email //
$message = "DownLoad Link: " . $link;
$mail = mail($email, $subject, $message, $headers);
echo "Email Sent";
}
}
$results = filelist($dir);
foreach($results as $result)
{
preg_match('#(.*).sql.gz#', $result, $match);
$filelocation = $dir . $match[0];
$link = uploadtors($filelocation);
}
?>
if server not supported gzip then change it:
PHP:
preg_match('#(.*).sql.gz#', $result, $match);
To:
PHP:
preg_match('#(.*).sql#', $result, $match);
And Add That Command To Cron: Run It Everyday (As You Need)
Code:
php path of that upload.php
example:
Code:
php /var/www/html/warezrocker/upload.php
If Any Problem Occur Reply Here,Say Thanks If You Think I deserve It!