Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Yogiz
Forum Newbie
Posts: 1
Joined: Tue Mar 04, 2008 3:09 pm

Question

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Question

Post by Christopher »

(#10850)
nincha
Forum Contributor
Posts: 191
Joined: Fri Mar 28, 2003 12:30 pm
Location: CA, USA

Re: Question

Post by nincha »

open the file -> read the file -> gather the data into a list (array) -> echo them in the correct format.
Post Reply