PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Salil Kothadia  >  LogParser  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: The example / implementation file
Class: LogParser
Parse Apache log files
Author: By
Last change: Change in description
Date: 13 years ago
Size: 348 bytes


Class file image Download

include 'LogParser.php';

$Instance = new LogParser('access.log');

// get a log line
while ($LogString = $Instance->GetLine())
$ParsedData = $Instance->Parse($LogString); // parse/format the line

echo '<pre>'; print_r($ParsedData); echo '</pre>';
Exception $e)

For more information send a message to info at phpclasses dot org.