PHP Classes
elePHPant
Icontem

PHP Archive: Extract contents of ZIP, TAR, RAR, PHAR archives

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files Documentation   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-09-05 (10 months ago) RSS 2.0 feedNot enough user ratingsTotal: 343 This week: 3All time: 6,449 This week: 424Up
Version License PHP version Categories  
php-archive 1.0.1GNU General Publi...5.3PHP 5, Compression
Description Author  

This class can extract contents of ZIP, TAR, RAR, PHAR archives.

It can open compressed archives in the ZIP, TAR, RAR, PHAR formats and list their file contents.

The class can also extract the archive files into a given directory or output the contents of specific files.

Picture of wapmorgan
Name: wapmorgan is available for providing paid consulting. Contact wapmorgan .
Classes: 20 packages by
Country: Russian Federation Russian Federation
Age: ???
All time rank: 124438 in Russian Federation Russian Federation
Week rank: 17 Up2 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

Details provided by the author  

Archive

Archive - tool for those who work with many popular archive formats (rar, zip and tar) a lot and want to avoid using different tools from command line.

Installation

Linux

If you want install that program for current directory only: ` wget -O archive https://github.com/wapmorgan/archive/raw/master/archive.php && chmod +x archive `

If you want install that program for all system (run as root): ` wget -O archive https://github.com/wapmorgan/archive/raw/master/archive.php && chmod +x archive mv archive /usr/local/bin `

Windows

  1. Manually download archive.bat and archive.php.
  2. Move to system folder like (C:\Windows).
  3. Run it from any folder like ` archive `

Usage

Usage is pretty simple:

archive [archive] {action} FILES... [--listFormat=] [--extractDir=]

ACTIONS

index You can get the list of files stored in archive. By passing --listFormat option you can specify output format. It has syntax similar to sprintf() format. The main improvement is you can specify placeholders like this: @placeholder%format where placeholder is an identificator of property for array entry. Standart listFormat: '@name%40s | @size%d | @time%s'.

extract Extract archive files to dir. By passing --extractDir option you can specify output directory.

print FILES... Print the files contents to standard output. Useful for on-the-fly searching.

Run archive without arguments to see all manual.

  Files folder image Files  
File Role Description
Accessible without login Plain text file archive.bat Data Auxiliary data
Plain text file archive.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%Total:343All time:6,449
 This week:3This week:424Up