epic.dk
How to parse Amazon S3 log format in php
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 "".$logEntry.""; preg_match('/(\S+) (\S+) \ (\S+) (\S+) (\S+) (\S+) (\S+) "(+)" (\S+) (\S+) (\S+) (\S+)