News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Johannes Schluter's Blog:
Searching through archive files
September 08, 2009 @ 12:12:07

Recently Johannes Schluter wrote up a post on searching through archived files (like .tar.gz or .bzip) to perform a full-text search on their contents:

As said the app is about browsing the PHP manual. The manual is provided as tar.gz to the app and I wanted to have a fulltext search. For accessing the tar.gz content I'm using phar. Yes, phar is not only for phar files but can work on different kinds of archives (tar.gz, tar.bz2, zip), too.

In the code he uses Iterators and a PharData instance to open and search the contents of the given file. He explains how it all works, too, as well as mentioning a few places where it might need a bit of work.

0 comments voice your opinion now!
phar search archive tutorial iterator


blog comments powered by Disqus

Similar Posts

Pierre-Alain Joye's Blog: ext/filter, API frozen (!) and fixes, 0.11.0 is out

Rob Allen's Blog: Tutorial Notes - Zend_Auth in French & Using Oracle

KillerPHP.com: Zend Framework Components Part 2: Zend_View

Matthew Weier O'Phinney's Blog: Responding to Different Content Types in RESTful ZF Apps

Michael Dowling: Favor Hash Lookups Over Array Searches


Community Events

Don't see your event here?
Let us know!


conference application release performance framework introduction opinion api interview example php7 community language install series laravel configure podcast library symfony2

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework