PHP wrapper for linux server
#1
https://github.com/digitalfiz/acRunner

There is a PHP wrapper I've created to run the server. Right now it starts the server and keeps it running and if the server dies for some reason, either someone crashes it or something else goes wrong it attempts to restart it automatically. It will only retry 10 times(this can be modified in the code to less) because I figured after 10 times something bad is wrong and it should just stop. I haven't added any notification of a failure yet thats coming soon.

It also creates tables for it to keep real time stats and provides everything you need for real time stats. Please check it out, test it and try to break it and let me know what you think and any ideas or problems you may have with it.

The real time stats stuff can be commented out if you just want a wrapper to auto restart the server when it dies and thats all.

Future plans are to add the ability to partially control the server from the bed. Like restarting it and stuff. I might be adding a separate set of tools in the web GUI for modifying the black lists and maprot and other stuff.
Thanks given by:
#2
link does not work for me :P
Thanks given by:
#3
Works fine for me.
Thanks given by:
#4
akward, my mac is shit so probably reason. xD
Thanks given by:
#5
ty for sharing
Thanks given by:
#6
Just wanted to show you guys what you can do with the database stats generated from the server. This is the realtime server stats for the YMH server. It shows you whats going on in the game in real time. http://ymh.digitalfiz.com/currentgame/

Before you ask this code is not release ready its just some GUI I put together to show off how the data in the database could be used. If you don't see anyone playing just wait a little while I'm sure some people will pop in and you will see what it looks like.

Hope you like it and remember if your playing with acRunner remember to pull the new code from github whenever you can because its changing very frequently. Like I have to fix a bug in it because it isnt catching the ping value for the players properly and I have tons more to add to it. Be sure to submit bug reports and maybe even tell me how it performs for you. I know there where some concerns with php's performance but it seems to be doing well for me and its been running for months.

https://github.com/digitalfiz/acRunner just encase someones to lazy to scroll up :P
Thanks given by:
#7
Fiz, SVN it? So it can be updated easily?
Thanks given by:
#8
Git, and I believe so.
Thanks given by:
#9
GIT > SVN check it out :P Check out the site github is awesome you can see what ive changed and when and all that plus you can pull each revision or fork it and do your own changes and send me a push request blah blah
Thanks given by:
#10
This is so hawt Fiz!
Good job, team!
Thanks given by:
#11
Nicely done, really. Of course, basic game status could also be requested through serverinfo/extinfo, but as soon as you want something better (real-time ladder? ;) ), this is the way to go.

Btw, didn't know you live in the future.
Copyright (c) 20010, Marc Seiler. All Rights Reserved.
Thanks given by:
#12
(16 Mar 11, 05:53PM)tempest Wrote: Btw, didn't know you live in the future.
Copyright (c) 20010, Marc Seiler. All Rights Reserved.

LOL! I didnt catch that one... Or I could be from the future hmmm.

(16 Mar 11, 05:53PM)tempest Wrote: Nicely done, really. Of course, basic game status could also be requested through serverinfo/extinfo, but as soon as you want something better (real-time ladder? ;) ), this is the way to go.

Also What kind of basic stats can you get from the server without parsing the logs besides whos playing and what game/mode the server is in? I tried my best with a previous script and thats all the info I could get well the players and what game/mode the server was in but not individual stats like scores and stuff. Heres an older script I made its a server lister and all I could get was the information I show. Click on the players link to see the player list but thats all I could get directly querying the server

http://digitalfiz.com/ac/example/example...cubers.net
If anyone wants to play with the server lister here is the code. Its rough code but very well commented. SO have fun :P http://digitalfiz.com/ac/acserverlist.tgz

pwnage{TyD} I tried to reply to your pm but you have private messaging disabled so here is the code :)
Thanks given by:
#13
You can get extended serverinfo from the server, like CubeLister does (screenshot). See the extinfo_ functions in server.cpp for details. Anyway, as I said...

Plus, I saw your script can also restart the server if it crashed etc, which extinfo obviously can't.
Thanks given by:
#14
(16 Mar 11, 07:58PM)tempest Wrote: You can get extended serverinfo from the server, like CubeLister does (screenshot). See the extinfo_ functions in server.cpp for details. Anyway, as I said...

Plus, I saw your script can also restart the server if it crashed etc, which extinfo obviously can't.

Very interesting I may incorporate this new information into the GUI and I may remove the code for getting that info manually.... its all about efficiency right? :D Thank you tempest
Thanks given by:
#15
I did not know you could do that.

Learn something new each day.
Thanks given by: