Zip context options — Zip context option listing
Zip context options are available for zip
wrappers.
Version | Description |
---|---|
7.2.0, PECL zip 1.14.0 |
Added password .
|
Example #1 Basic password
usage example
<?php
/ Read encrypted archive
$opts = array(
'zip' => array(
'password' => 'secret',
),
);
/ create the context...
$context = stream_context_create($opts);
/ ...and use it to fetch the data
echo file_get_contents('zip://test.zip#test.txt', false, $context);
?>
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant