Hi there,

If you want to parse / split the items in the Amazon S3 logformat in php, you need some regular expression magic.

Here is my snippet
Based on a array of the linies in the logfile

foreach ($LogEntries as $logEntry)
{
$items = explode(" ",$logEntry);
echo "<pre>".$logEntry."</pre><br />";
preg_match('/(\S+) (\S+) \[(.*?)\] (\S+) (\S+) (\S+) (\S+) (\S+) "([^"]+)" (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) "([^"]+)" "([^"]+)"/', $logEntry, $matches);
var_dump($matches);
}

/Renzo