2017 © Pedro Peláez
 

library mixnode-warcreader-php

Read Web ARChive (WARC) files in PHP.

image

mixnode/mixnode-warcreader-php

Read Web ARChive (WARC) files in PHP.

  • Saturday, March 11, 2017
  • by mixnode
  • Repository
  • 1 Watchers
  • 6 Stars
  • 198 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 23 % Grown

The README.md

Mixnode WARC Reader for PHP

This library allows developers to read Web ARChive (WARC) files in PHP., (*1)

Installation Guide

We recommend Composer for installing this package:, (*2)

curl -sS https://getcomposer.org/installer | php

Once done, run the Composer command to install Mixnode WARC Reader for PHP:, (*3)

php composer.phar require mixnode/mixnode-warcreader-php

After installing, you need to require Composer's autoloader in your code:, (*4)

require 'vendor/autoload.php';

You can then later update Mixnode WARC Reader using composer:, (*5)

bash composer.phar update, (*6)

A Simple Example

<?php
require 'vendor/autoload.php';

// Initialize a WarcReader object 
// The WarcReader constructure accepts paths to both raw WARC files and GZipped WARC files
$warc_reader = new Mixnode\WarcReader("test.warc.gz");

// Using nextRecord, iterate through the WARC file and output each record.
while(($record = $warc_reader->nextRecord()) != FALSE){
    // A WARC record is broken into two parts: header and content.
    // header contains metadata about content, while content is the actual resource captured.
    print_r($record['header']);
    print_r($record['content']);
    echo "------------------------------------\n";
}

The Versions

11/03 2017

dev-master

9999999-dev

Read Web ARChive (WARC) files in PHP.

  Sources   Download

Apache-2.0

by Nariman Jelveh

11/03 2017

0.0.6

0.0.6.0

Read Web ARChive (WARC) files in PHP.

  Sources   Download

Apache-2.0

by Nariman Jelveh

10/03 2017

0.0.5

0.0.5.0

Read Web ARChive (WARC) files in PHP.

  Sources   Download

Apache-2.0

by Nariman Jelveh

10/03 2017

0.0.4

0.0.4.0

Read Web ARChive (WARC) files in PHP.

  Sources   Download

Apache-2.0

by Nariman Jelveh

10/03 2017

0.0.1

0.0.1.0

Read Web ARChive (WARC) files in PHP.

  Sources   Download

Apache-2.0

by Nariman Jelveh