Creating a GZipped tar file and dynamically streaming it through PHP?

Is there a simple interface like ZipArchive for tar.gz archives that allows me to transfer the archive to the client rather than saving it to the server? And if so, can someone show me how?

Thanks!

+6
source share
2 answers

This link may be useful for you. Can you clarify if you want to temporarily reside in the file system?

http://www.clker.com/blog/2008/03/27/creating-a-tar-gz-on-the-fly-using-php/

0
source

You can direct the tar command with passthru () or exec () to send the tar.gz file to stdout. For instance.

tar cfz - name1 name2 ... 
+3
source

Source: https://habr.com/ru/post/913246/


All Articles