Return to Snippet

Revision: 63899
at June 16, 2013 02:23 by codehero11


Initial Code
Part 1

// Replace the name of your site in place of www.volk37.com

Ping 'www.volk37.com' and Post command 'run_backup'
 
$url = 'http://www.volk37.com';
$ping = Yii::app()->CURL->run($url,FALSE,
            array('command' => 'run_backup')
        );

Part 2

if(isset($_POST['command'] == 'run_backup'))
   {
       //(i) run backup function, save backup-details in db
       //(ii) and also send backup-details by ping-back
   }

Initial URL


Initial Description
You can use Curl to create a backup of your site easily. It is very effective method for those who complain that they lost site content.

Initial Title
Create the backup of your site using curl

Initial Tags
backup

Initial Language
PHP