Ok, so after doing an extensive search, I havent found anything about getting server statistics through the tron ladder, matches_won, rounds_won txt files
I have a server up and runnin which automatically ftp's those files to my webserver to view. However, I would like to have those statistics loaded into a single php page that someone could view. I originally was going to do this in a iframe format, having 4 frames (1 top, then 3 rows) which would use php include or fopen commands to load.
However, I have been having several issues with being able to purse these txt files to load properly (they run on, and I could create an array table to separate but space would be the only common character I could use which screws everything up)
So I guess my question would be, How would u go about loading server stats using these files. I could load them into a mysql database is thats the only option however I'd prefer using the txt files instead
I noticed tank created a site very very close to what I wanna do so hopefully if your out there, you could respond and help me out on this. Thanks in advance for your help. Any advice or links would be appreciated (i'm coming up pretty dry on google)
http://electricpotential.net/temp/tankprogram.html
David
Server Stats using txt? Tank help
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
Most people write something custom in PHP usually. There just hasn't been a really good way to do this for everyone. The output you see there was generated by this code which is incomplete. What that does is it parses scorelog.txt, but it's the format of 0.2.6.x and 0.2.7.x, which I don't think is directly compatible with the newer formats. That and all it does is generate a one-time report for a player, because I never really finished working on it. I think my idea this time was to generate static pages for each player every 24 hours or so because I couldn't figure out a good way to store that information in a database. That and the several million line scorelog.txt file I have makes it a bit of a resource hog. I think I got it down to 5 or 10 minutes, down from a few hours to run. Using profiling helped. The stopping problem was some unusual lines in the file that I couldn't quite figure out the right regular-expressions for.
Edit: Look closer, the output of the .html isn't exactly what that program puts out, which makes me think I've got a few more changes floating at home which I didn't commit to SVN. I can't get at them right now because I'm on vacation, but I'll take a look when I get back if I remember.
Edit: Look closer, the output of the .html isn't exactly what that program puts out, which makes me think I've got a few more changes floating at home which I didn't commit to SVN. I can't get at them right now because I'm on vacation, but I'll take a look when I get back if I remember.

- Alpha Centauri
- On Lightcycle Grid
- Posts: 42
- Joined: Wed Jul 09, 2008 8:09 pm
- Location: United States
- Contact:
If one were to start from scratch, I'd recommend using ladderlog.txt over scorelog.txt. The former is much more amenable to automated parsing.
Nexus9 server ultra-admin.
do you mean like the one i have at http://space-lab.us/stats.php ? if you like, ill give you the source
U know what...that would actually do very well. Maybe we can get together on aim or something and discuss it. Or drop me a PM when u get a chance then. Thanks!ivantis wrote:do you mean like the one i have at http://space-lab.us/stats.php ? if you like, ill give you the source
Thats pretty much exactly what I was thinking about when I first thought the idea up