PHP code example of spotman / davbackup
1. Go to this page and download the library: Download spotman/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/ */
spotman / davbackup example snippets
$ya = new YandexBackup('[email protected]', 'test');
$ya->setDbConnection('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);
}
}