Parsing a text file to display certain data on my website in php?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I dont want to display everything, of course ^^, but how do i get the player name, the number of games he played and his score to display it in a webpage in this fasion:
Name Games Played Score
joe blow1 25 9876890
joe blow2 31 8989767
joe blow2 26 7989767
joe blow2 17 5989767
joe blow2 13 4989767
and by highest score because the log doesin't put them in in score order....
please help, i asked the maker because he has one runing already but no answer back, well the game is pretty old so i didn't really expect an answer anyways and tryed to figure it out but i dont know functions in php, this is to include in a php-nuke block (this i know how to do
Seriously if you have a paypal account it would be my pleasure to give you a little something , im not rich but i'll give you what i can....
you can send your info here email@example.com if you wish,, like i said it would be a pleasure because this is actually the first code i know that is tailor made for this classic game server so i thank you VERY much and is very much appreciated ^^
This works great but puts all of the line in playername1,, how do i display only the player name in that field, then in the next the numbers of games he player then after that the score in the next field? or how does the script work?
ok i figured out that $line_arr = explode(' ', $buffer); this is the value that takes in to account that after the space it becomes the next value, but in this log file there is a NUL symbol, what is this?, what can i put between the quotes in $line_arr = explode('HERE', $buffer); to represent that NUL symbol?
ok the problem is that the server removes those NUL symbols and i loose the spaces,, is there a way to read that file with this script while keeping the spaces?
or can i copy this file to the location of this script, covert it to another format and read it,, but how or with what do i convert it?, i know how to copy it with cron and all but what program on an ubuntu server can i use to convert this file to unicode or a format wich keeps the spaces?
kewwwwlll!,, ok i checked the link you provided on the explode() argument but i cant see anything that explains on how to print only chunks of a line, for example mine has 14 values,, but how do i only print the name, the numbers of games played and the score?, because the other values are passwords and e-mails i wouldn't want to display that to the public.....
if you dont feel like explaining can you provide me with the argument i can use to do this?