solaris/php-dmarc 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

solaris/php-dmarc

最新稳定版本:v2.0.1

Composer 安装命令:

composer require solaris/php-dmarc

包简介

A simple DMARC report parser for PHP.

关键字:

README 文档

README

php-dmarc is a small PHP class I wrote to parse DMARC aggregate reports and put the data in a MySQL database for easy analysis. The idea is that when recipients start supporting delivery of reports using HTTP, then this can form part of an endpoint that receives and automatically parses the reports.

Improvements/fixes welcome.

Installation

The library is available on Packagist (solaris/php-dmarc) and can be installed using Composer. Alternatively you can grab the code directly from GitHub and include the DmarcAggregateParser.php script directly or via a PSR-0 autoloader.

Usage

  • Set up your database. tables.sql contains the SQL needed to set up the tables.

  • Use the Solaris\DmarcAggregateParser class to parse reports - you need to supply it with database credentials, and then run the parse() function with an array of files to parse. Something like this:

      $parser = new Solaris\DmarcAggregateParser( 'dbhost', 'dbuser', 'dbpass', 'dbname' );
      $parser->parse( array( 'report-file-1.xml', 'report-file-2.xml', 'report-file-3.xml' ) );
    

    You can supply either XML files or ZIP files. It is assumed that each ZIP file contains only one report.

  • Knock your self out analysing the data.

The parse() function returns false if it encounters any errors while parsing the data (true otherwise). To see what the errors were, use the get_errors() method, which will return an array of error messages.

统计信息

  • 总下载量: 1.27k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 63
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 63
  • Watchers: 8
  • Forks: 20
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-09-26