Created
January 12, 2015 14:46
-
-
Save sdeluce/9ae5a20adac4441ec76f to your computer and use it in GitHub Desktop.
Script php Akeeba pour automatiser les sauvegardes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $curl_handle=curl_init(); | |
| curl_setopt($curl_handle, CURLOPT_URL, 'http://www.xxxxxx.xx/index.php?option=com_akeeba&view=backup&key=motdepasse_mentionné_dans_les_paramètres'); | |
| curl_setopt($curl_handle,CURLOPT_FOLLOWLOCATION, TRUE); | |
| curl_setopt($curl_handle,CURLOPT_MAXREDIRS, 10000); | |
| curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER, 1); | |
| $buffer = curl_exec($curl_handle); | |
| curl_close($curl_handle); | |
| if (empty($buffer)) | |
| echo "Sorry, the backup didn't work."; | |
| else | |
| echo $buffer; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment