[PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Erwin
Sascha Braun wrote: Hi, I want to make some people download files the server tar's on demand. But i don't know really how to send the files back to the browser. I used the following command for taring the file: ? $command = 'tar -c '.$arrResult['name'].'.tgz

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Sascha Braun
Now I tried to use your script: $_REQUEST['image'] is = '../images/2002/09/jpg/ls006022_pettersson_johan.jpg'; ? Header('Content-Type: application/x-gzip'); $command = 'tar -cf - ../images/' . $_REQUEST['image'] . ' | gzip -cf'; system( $command ); ? It opens the download dialog again and lets

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Erwin
Now I tried to use your script: $_REQUEST['image'] is = '../images/2002/09/jpg/ls006022_pettersson_johan.jpg'; ? Header('Content-Type: application/x-gzip'); $command = 'tar -cf - ../images/' . $_REQUEST['image'] . ' | gzip - cf'; system( $command ); ? It opens the download dialog

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Sascha Braun
Seems to work not that bad, but I got another Question. Why isn't there anything in the archive? This is my code yet: ? Header('Content-Type: application/x-tar'); Header(Content-disposition: attachment; filename=.$_REQUEST['name']..tar); $command = 'tar -cf - ../images/' . $_REQUEST['image'];

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Erwin
Sascha Braun wrote: Seems to work not that bad, but I got another Question. Why isn't there anything in the archive? It works in here (just tested it), I don't know why it's empty (don't stop reading here!!! :-) ) This is my code yet: ? Header('Content-Type: application/x-tar');

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Sascha Braun
Ok, somebody told me, the archive contains the Image, only winrar seems not to show the image, grrr. I tried the gzip method and it did not work that fine for me. Sascha Braun wrote: Seems to work not that bad, but I got another Question. Why isn't there anything in the archive? It

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Erwin
Sascha Braun wrote: Ok, somebody told me, the archive contains the Image, only winrar seems not to show the image, grrr. ;-)) That's why...i did see the image too! I tried the gzip method and it did not work that fine for me. Hmz...too bad, because you will get smaller downloads then (use

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Sascha Braun
Do you know how to exclude the path informations in the tar archive? Sascha Braun wrote: Ok, somebody told me, the archive contains the Image, only winrar seems not to show the image, grrr. ;-)) That's why...i did see the image too! I tried the gzip method and it did not work that

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Erwin
Sascha Braun wrote: Do you know how to exclude the path informations in the tar archive? Yes, first chdir to the ../images directory http://www.php.net/getcwd http://www.php.net/chdir Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: Tar Files and send back to browser

2002-09-26 Thread Sascha Braun
IT'S WORKING, GOOD DAMN, IT'S WORKING! Yo, this was a really hard Job, if I look at the working snipped below! ? Header('Content-Type: application/x-tar'); Header(Content-disposition: filename=.$_REQUEST['name']..tar); $dir = explode(/, $_REQUEST['image']);