jkh/apache-log-parser-library
Composer 安装命令:
composer require jkh/apache-log-parser-library
包简介
apache parser library
README 文档
README
Install
Using composer:
composer require jkh/apache-log-parser-library
Usage
Simply instantiate the class :
$parser = new \jkh\ApacheLogParser\ApacheLogParser();
And then parse the lines of your access log file :
$log_file = '/var/log/apache2/access.log'; $handle = fopen($log_file, "r"); if ($handle) { while (($line = fgets($handle)) !== false) { $entry = $parser->parse($line); } fclose($handle); } else { echo "An error occurred: unable to open the file!\n"; }
Where $entry object will hold all data parsed.
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-03