Create the backup of your site using curl


/ Published in: PHP
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. Part 1
  2.  
  3. // Replace the name of your site in place of www.volk37.com
  4.  
  5. Ping 'www.volk37.com' and Post command 'run_backup'
  6.  
  7. $url = 'http://www.volk37.com';
  8. $ping = Yii::app()->CURL->run($url,FALSE,
  9. array('command' => 'run_backup')
  10. );
  11.  
  12. Part 2
  13.  
  14. if(isset($_POST['command'] == 'run_backup'))
  15. {
  16. //(i) run backup function, save backup-details in db
  17. //(ii) and also send backup-details by ping-back
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.