Alright. The text file in question is an online game server's log file (log.log being the file, the game being Halo). It has information in it that I would like to be extracted and put in a table in a php file. It needs to be polled regularly (maybe every 30 minutes). Here is a piece of the log file:
The information I want to extract are in the lines with "PCR_TEAM" and "PCR_PLAYER ," and I want all of the information in those lines which comes after the aforementioned strings to be displayed in tables in a php file (and maybe the date and time on the line, as well). They contain the scores for each team and each player at the end of every game. There are several instances of these in the log file, and I would like each instance to have its own table.
Here's an example of how I would like the information to be displayed in a table:
Would someone be kind enough to write a php file which will do that? I know next to nothing about php, so the code for this would need to be complete (as opposed to being just a certain part of the file) for me to be able to utilize it.
Code:
2007-02-16 21:58:42 KILL "¬ÞØøþ¬" player 3 KILLED "MastaSpoofa" player 5 2007-02-16 21:58:43 CHAT GLOBAL [HIV]Cheefa what map 2007-02-16 21:58:44 CHAT GLOBAL MastaSpoofa LOL 2007-02-16 21:58:46 CHAT GLOBAL ¶®ïñ©eÒf¶wñ lol on the gun 2007-02-16 21:58:52 CHAT GLOBAL MastaSpoofa blood gulch 2007-02-16 21:58:53 CHAT GLOBAL MastaSpoofa go 2007-02-16 21:59:00 CHAT GLOBAL MastaSpoofa ice fields 2007-02-16 21:59:00 CHAT GLOBAL MastaSpoofa go 2007-02-16 21:59:04 SCORE CTF player 4 "¬ÞØøþ¬" team 0 2007-02-16 21:59:04 PCR_TEAM Team 0 Score 3 2007-02-16 21:59:04 PCR_TEAM Team 1 Score 0 2007-02-16 21:59:04 PCR_PLAYER Place 1 Player 4 "¬ÞØøþ¬" Team 0 Kills 6 Assists 1 Deaths 5 Score 2 2007-02-16 21:59:04 PCR_PLAYER Place 2 Player 2 "pikachu" Team 0 Kills 5 Assists 2 Deaths 4 Score 1 2007-02-16 21:59:04 PCR_PLAYER Place 3 Player 6 "MastaSpoofa" Team 1 Kills 6 Assists 0 Deaths 4 Score 0 2007-02-16 21:59:04 PCR_PLAYER Place 4 Player 5 "[HIV]Cheefa" Team 1 Kills 4 Assists 2 Deaths 3 Score 0 2007-02-16 21:59:04 PCR_PLAYER Place 5 Player 3 "Isaac" Team 0 Kills 3 Assists 2 Deaths 5 Score 0 2007-02-16 21:59:04 PCR_PLAYER Place 6 Player 1 "¶®ïñ©eÒf¶wñ" Team 1 Kills 2 Assists 3 Deaths 9 Score 0
Here's an example of how I would like the information to be displayed in a table:
Code:
2007-02-16 21:59:04 Place Name Team Kills Assists Deaths Score 1 ¬ÞØøþ¬ 0 6 1 5 2 2 pikachu 0 5 2 4 1 3 MastaSpoofa 1 6 0 4 0 4 [HIV]Cheefa 1 4 2 3 0 5 Isaac 0 3 2 5 0 6 ¶®ïñ©eÒf¶wñ 1 2 3 9 0 ------------------------------------------------------------------ Team 0 3 Team 1 0
Comment