PHP code example of avvertix / dmarc-report-parser
1. Go to this page and download the library: Download avvertix/dmarc-report-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
avvertix / dmarc-report-parser example snippets
$dmarc = new Avvertix\DmarcReportParser\DmarcReportParser();
/**
* @var Avvertix\DmarcReportParser\Data\DmarcReport
*/
$report = $dmarc->fromFile('path/to/report.xml');
$dmarc = new Avvertix\DmarcReportParser\DmarcReportParser();
$xml = <<<'DMARC'
<?xml version="1.0"