summaryrefslogtreecommitdiff
path: root/test/index.php
blob: 3eb4769f02ad8e9d47ba5dc42e4fc42f8af33430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

require '../zipstream.php';

$files = array(
  '/home/pabs/pablotron/files/url_scripts-0.1.0.tar.gz',
  '/home/pabs/pablotron/files/url_scripts-0.1.1.tar.gz',
  '/home/pabs/pablotron/files/url_scripts-0.1.2.tar.gz',
  '/home/pabs/pablotron/files/url_scripts-0.1.3.tar.gz',
);

$zip = new ZipStream('url_scripts.zip', true);

foreach ($files as $file)
  $zip->add_file(basename($file), file_get_contents($file));

$zip->finish();

?>