PHP code example of wgenial / s3-bucket-stream-zip-php
1. Go to this page and download the library: Download wgenial/s3-bucket-stream-zip-php 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/ */
wgenial / s3-bucket-stream-zip-php example snippets
// taken from examples/simple.php
// since large buckets may take lots of time we remove any time limits
set_time_limit(0);
am = new S3BucketStreamZip(
// $auth
array(
'key' => '*********', // o stream)
)
);
$stream->send('name-of-zipfile-to-send.zip');
$stream->sendFiles('name-of-zipfile-to-send-2.zip', array(
'files' => array(
array(
'key' => 'filename1.jpg',
},
array(
'key' => 'filename2.jpg',
'name' => 'image2.jpg'
},
)
);