Web www.gerd-tentler.de
Version 1.2 (released Feb. 3, 2006) [Download]

Usage

Include the LOGCHECK class into your PHP script and create a new instance:
$log = new LOGCHECK("/path/to/sendmail.log");
You can set the number of entries in the top ranking (default is 10) with this variable:
$log->entries = 30;
You can set the following filters to tweak your report, using regular expressions:
$log->filter['from'] = "user1@isp1";       // sender's e-mail address
$log->filter['to']   = "user2@isp2";       // recipient's e-mail address
$log->filter['stat'] = "deferred|timout";  // status
Status can be "sent", "deferred", "user unknown", "host unknown", "service unavailable", "timeout", "queued", etc.

You can change the look of your HTML report by adapting several variables, for example:
$log->titleFont   = "Comic Sans MS";
$log->graphBorder = "1px solid #D00000";
$log->cellBGColor = "#FFF0E0";
If you want an ASCII report instead, change this variable (default is HTML):
$log->format = "ASCII";
Finally create the report:
echo $log->report();

Comments