1. Go to this page and download the library: Download victor78/zippy-ext 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/ */
victor78 / zippy-ext example snippets
use Victor78\ZippyExt\Zippy;
// Require Composer's autoloader
// Open an archive
$archive = $zippy->open('build.tar');
// Iterate through members
foreach ($archive as $member) {
echo "Archive contains $member" . PHP_EOL;
}
// Open an archive
$archive = $zippy->open('build.tar');
// Extract archive contents to `/tmp`
$archive->extract('/tmp');
// Creates an archive.zip that contains a directory "folder" that contains
// files contained in "/path/to/directory" recursively
$archive = $zippy->create('archive.zip', array(
'folder' => '/path/to/directory'
), true);
// Creates an archive.zip using the 7zip engine
$archive = $zippy->create('archive.zip', $files, true, '7zip');
// Creates an archive.zip with AES-256 encryption
$archive = $zippy->create('archive.zip', $files, true, '7zip', 'your_password');
// Open archive with password
$archive = $zippy->open('archive.zip', '7zip', 'your_password');
$archive->extract('folder_for_extracted');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.