Posted By

codehero11 on 06/16/13


Tagged

backup curlphpsite


Versions (?)

Create the backup of your site using curl


 / Published in: PHP
 

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.

  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  

You need to login to post a comment.