Posts: 4
Threads: 1
Joined: Nov 2006
Reputation:
0
Hi
There have been numerous PHP scripts to query server (displaying information such as hostname and map), and also rcon scripts to execute rcon commands...
I am trying to get a way for a website to read and parse logs from the server, live (not old log files)
CSS Servers have an option to add a log address, and I believe this then chucks the live stream of data to that IP.. can anyone make/show me php to:
a.) just read this and display it live on a webpage as it happens?
b.) have a live count of scores (ct 1 t 2, etc)
c.) detected when any player says a certain phrase (such as !command)
Many many thanks
Corin
Posts: 2,270
Threads: 45
Joined: May 2007
Reputation:
11
I'm not sure if this does this but i like this very much, greycube.com. At the very least it would be a starting point for you.
realchamp Wrote:Hazz Wrote:Has someone helped you on these forums? If so, help someone else
Mooga Wrote:OrangeBox is a WHORE.
Posts: 4
Threads: 1
Joined: Nov 2006
Reputation:
0
greycube is a highly complex system, not a framework, nor is it anywhere near what I actually said
Posts: 2,270
Threads: 45
Joined: May 2007
Reputation:
11
Hey just trying to help no need to get mad. And pretty sure looking at log files is the only way.
realchamp Wrote:Hazz Wrote:Has someone helped you on these forums? If so, help someone else
Mooga Wrote:OrangeBox is a WHORE.
Posts: 4
Threads: 1
Joined: Nov 2006
Reputation:
0
I didnt "get mad" I merely informed you that you were wrong.
Why are you saying you're pretty sure of something when what you actually mean "I dont have a clue about this so I'll take a wild guess".
In my first post I said (not asked, said) that its possible - if you dont believe me, go download HLSW and check it out.
All I don't know is how to use php to read the incomming logs
Posts: 250
Threads: 4
Joined: Feb 2006
Reputation:
0
I dont think you're going to achieve this easily. HTTP is a stateless protocol, while HLSW is using TCP for a stateful connection, hence it can stream data like that. If you want to attempt streaming data, my guess is you're going to have to look into flash, a java applet or conjur up some fancy web 2.0 ajax to do it.
It's poor show comparing what HLSW written in C++/C#/.Net and it's functionality to something you want php to do.
Posts: 483
Threads: 9
Joined: Mar 2007
Reputation:
0
metamod: source might have something for you. The IRC bot looks kinda promising for what you want to do.
You can have a java client load in a browser and auto join a channel where your bot is doing its thing.
Posts: 61
Threads: 4
Joined: Jul 2007
Reputation:
0
if you want to do it with PHP, you will need a cgi-based, shell-based or c++-based daemon process on your server.
else take a look into the log-files on ftp - they can be configured to directly output your logs so they should be very near realtime
Q: What would an omnipotent computer to?
A: Get rid of humanity!
Posts: 3,906
Threads: 404
Joined: Oct 2007
Reputation:
21
Corin: You did get angry at Spartanfrog for no reasion, and that's a BAD (badbadbad) Idea since he's pretty much the #2 around here.
As for what you are saying, I know someone who probably can do it, IF it's possible.
I can't be sure he'll post it for ya though, he makes TONS of tools for himself and our server but doesn't publicly post much (currently).