PHP code example of dmamontov / davbackup
1. Go to this page and download the library: Download dmamontov/davbackup library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dmamontov / davbackup example snippets
$ya = new YandexBackup('[email protected]', 'test');
$ya->setConnection('user', 'password', 'db')
->setPath('/var/www/public_html')
->setType(YandexBackup::ZIP)
->setRemoveFile(false)
->execute();
class MyDavBackup extends DavBackup
{
const URL = 'https://dav.my.ru/';
public function __construct($login, $password)
{
parent::__construct(self::URL, (string) $login, (string) $password);
}
}