Файл: crons/yandexdisk.php
Строк: 19
<?
include('class_webdav_client.php');
function send_to_yadisk($bufile = "")
{
$wdc = new webdav_client();
$wdc->set_server('ssl://webdav.yandex.ru');
$wdc->set_port(443);
$wdc->set_user(SANTI_YAD_LOGIN);
$wdc->set_pass(SANTI_YAD_PASSWORD);
// use HTTP/1.1
$wdc->set_protocol(1);
// enable debugging
$wdc->set_debug(false);
if (!$wdc->open()){}
if (!$wdc->check_webdav()){}
$http_status = $wdc->mkcol("/santibackups/");
$http_status = $wdc->put_file( "/santibackups/".$bufile, SANTI_SERVERPATH."/".SANTI_PATH."/datas/backups/".$bufile);
$wdc->close();
//if ($wdc->get_file("/soutcast/woman/gogo/1arhiv.rar", "1arhiv.rar")){}
$fileUnpublishinStatus = $wdc->fileUnPublish("/santibackups/".$bufile);
}
?>