Page 1 of 1

Question

Posted: Tue Mar 04, 2008 3:14 pm
by Yogiz
Hi there.

I want to write a script that will output data from a log file into a html table.

The file I'm working with consists of 10 columns and has the following format "";

"1193188568.265 187 10.164.117.2 TCP_MISS/200 1983 GET http://www.example.com - DIRECT/208.69.34.231 text/html"

This is a sort of output I would like to achieve, any idea on how this can be done in php?

Column No. 1 2 3 4 5 6 7 8 9 10
1193188579.500 | 63 | 10.164.117.2 | TCP_MISS/200 | 902 | GET | http://www... |-| DIRECT/212.187.229.42 | text/html

Thanks in advance

Re: Question

Posted: Tue Mar 04, 2008 3:23 pm
by Christopher

Re: Question

Posted: Tue Mar 04, 2008 4:47 pm
by nincha
open the file -> read the file -> gather the data into a list (array) -> echo them in the correct format.