TAR File Management With PHP Archive_Tar (
Page 1 of 8 )
Need to create or manipulate a TAR file through your Web browser? Take a look at the PEAR Archive_Tar class, which exposes a simple, yet extremely powerful, API to perform manipulation of TAR and TGZ archives through a PHP script. Possible applications include a TAR file viewer and a Web-based backup utility. The PHP user community never ceases to amaze me.
No fewer than six times in the past few months have I needed a custom
thingammyjig for one of my projects and, after having made the decision to
design and code it myself, checked Google on the off-chance that someone had
already written it and found exactly what I needed in a PHP user group or code
repository. Not only is this incredibly cool - like all lazy programmers, I hate
reinventing the wheel - but it's also a testament to the immense popularity of
the language, and to the creativity it inspires among developers on a daily
basis.
This tutorial deals with one such tool, the Archive_Tar class. This is not a
tool you might be familiar with, it's not even a tool that you'll use on a
regular basis. However, in case you ever need a way to build a TAR archive
through PHP code, it's an invaluable addition to your PHP armory. Keep reading,
and let me introduce you.