mixnode/mixnode-warcreader-php
最新稳定版本:0.0.6
Composer 安装命令:
composer require mixnode/mixnode-warcreader-php
包简介
Read Web ARChive (WARC) files in PHP.
README 文档
README
This library allows developers to read Web ARChive (WARC) files in PHP.
Installation Guide
We recommend Composer for installing this package:
curl -sS https://getcomposer.org/installer | php
Once done, run the Composer command to install Mixnode WARC Reader for PHP:
php composer.phar require mixnode/mixnode-warcreader-php
After installing, you need to require Composer's autoloader in your code:
require 'vendor/autoload.php';
You can then later update Mixnode WARC Reader using composer:
composer.phar update
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"; }
统计信息
- 总下载量: 4.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2017-03-10