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: 2,270
Threads: 45
Joined: May 2007
Reputation:
11
12-06-2007, 08:27 AM
(This post was last modified: 12-06-2007, 08:46 AM by Spartanfrog.)
Corin Wrote: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
....Your totally right......
I misunderstood what you said, i didnt take a "wild guess." Then i didnt make it clear that when i said you couldnt do it. To show when someone said !command, you would have to use something like eventscripts to record the data. Then send it with the ip log address which you can also do with eventscripts. I'm almost 100% PHP cannot see !command without something like eventscripts.
Edit: Fixed grammar
realchamp Wrote:Hazz Wrote:Has someone helped you on these forums? If so, help someone else
Mooga Wrote:OrangeBox is a WHORE.
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).
~ Mooga ...w00t? - SRCDS.com on Twitter
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.
Posts: 2,270
Threads: 45
Joined: May 2007
Reputation:
11
Dam right Mooga lol. How does your friend do this? You are pretty lucky to have a friend that is able to do that. None of my friends can do that . But seriously, does he use php or something like eventscripts?
realchamp Wrote:Hazz Wrote:Has someone helped you on these forums? If so, help someone else
Mooga Wrote:OrangeBox is a WHORE.
Posts: 3,906
Threads: 404
Joined: Oct 2007
Reputation:
21
I don't know if he does it with php, but I know he's made several customized java apps and more. I'm also running a php script he made that gives the top 20 players on our server preferred status.
~ Mooga ...w00t? - SRCDS.com on Twitter
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.
Posts: 2,270
Threads: 45
Joined: May 2007
Reputation:
11
lucky!
realchamp Wrote:Hazz Wrote:Has someone helped you on these forums? If so, help someone else
Mooga Wrote:OrangeBox is a WHORE.
Posts: 3,906
Threads: 404
Joined: Oct 2007
Reputation:
21
This can not be done.
~ Mooga ...w00t? - SRCDS.com on Twitter
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.
Posts: 2,270
Threads: 45
Joined: May 2007
Reputation:
11
I called it first.
realchamp Wrote:Hazz Wrote:Has someone helped you on these forums? If so, help someone else
Mooga Wrote:OrangeBox is a WHORE.
|