[Typo3] best method to zip

Pierre pierre at web-lance.com
Mon Feb 28 12:26:34 CET 2005


Hi list,

in an extension, i have a session basket (recs) filled with the name of 
photos, and i have to create a zip that contains this photos (only a 
copy i don't wanna the real one to be erased) and gice the possibilitiy 
to download this zip.
In a php way i've done this :
----
session_start();
$listpic='';
foreach ($_SESSION['cart'] as $pic) {
	$listpic.='"'.$pic.'" ';
}
$output = shell_exec('zip -rjm /tmp/salonmcb.zip '.$listpic);
header("Content-type:application/zip");
header("Content-Disposition: attachment; filename=\"salonmcb.zip\"");
readfile('/tmp/salonmcb.zip');
@unlink('/tmp/salonmcb.zip');
----
and i have created a link to this file... but what is for you the best 
way with typo3 ??
Thanks a lot for clues :)
Cheers
Pierre



More information about the TYPO3-english mailing list