backdoor/websitebackup

这将生成网站的备份。

1.2 2022-12-21 16:28 UTC

This package is auto-updated.

Last update: 2024-09-21 20:36:10 UTC


README

此包用于备份任何网站链接。它将下载所有文件,包括图片、CSS、JS等,并将其保存在一个文件夹中。

安装

composer require backdoor/websitebackup

用法

use Backdoor\WebsiteBackup\WebsiteBackup;
function siteBackup(){

    $url = 'link to your website page to backup';
    $path = 'path to save backup file';
    $filePath = 'path to set as file path in backup file. This is optional. If not set, it will use the $path';

    $websiteBackup = new WebsiteBackup();
    $backup = $websiteBackup->backup($url, $path);

}

返回

array:3 [▼[
    'error' => false,
    'message' => 'Backup created successfully',
    'path' => 'your_given_path/index.html'
];

示例

use Backdoor\WebsiteBackup\WebsiteBackup;
function siteBackup(){
    $url = 'link to your website page to backup';
    $path = 'path to save backup file';
    $filePath = 'path to set as file path in backup file. This is optional. If not set, it will use the $path';

    $websiteBackup = new WebsiteBackup();
    $backup = $websiteBackup->backup($url, $path, $filePath);

    if(!$backup['error']){
        echo $backup['path'];
    }
}

许可证

MIT许可证(MIT)。请参阅许可证获取更多信息。

安全

如果您发现任何安全相关的问题,请通过电子邮件[mailto:[email protected]]而不是使用问题跟踪器。