PHP code example of arquivei / download-manager

1. Go to this page and download the library: Download arquivei/download-manager 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/ */

    

arquivei / download-manager example snippets


$bucket = 'my-bucket';
$basePath = 'files';
$storagePath = 'my-company/my-file.xml';

$downloader = new \Arquivei\DownloadManager\Download\Downloader();
$downloader->download($bucket, $basePath, $storagePath);

$bucket = 'my-bucket';
$basePath = 'files';
$storagePath = 'my-company/my-file.xml';
$expireSeconds = 60;

$downloader = new \Arquivei\DownloadManager\Download\Downloader();
$signedUrl = $downloader->signObject($bucket, $basePath, $storagePath, $expireSeconds);