Getting server info with PHP


(red_mamba) #1

Hi!

Where can I find any directions on how to write this?
Basicaly I want to see how many players are online and which team they belong, how many XP…

I know I must send commands like “getstatus\x00” to server and comunication is not a problem. I need some info on the data returned so I can parse usefull info.

10x


(Fusen) #2

there are already scripts out to do this for you like qQuery or something


HISTORY OF SCUDERIA FERRARI HISTORY


(red_mamba) #3
  1. it doesn’t work well with ET
  2. why use other scripts if I can write one my self?

(funkPig) #4

Why use the wheel if you can reinvent it yourself? :banana:

Seriously though…If you want to learn how, go ahead and build your own. Otherwise, don’t waste your time


(duke'ku) #5

You can use qstat to check on a server status. Here’s an example of it’s usage: http://bani.anime.net/etpro/servers.html

http://www.qstat.org/


(red_mamba) #6

I still did not get what I wanted, I need specs for the protocol not links
to scripts.


(Fusen) #7

well why not get these scripts and find the right commands in the source


Extreme Q Vaporizer Review


(forty) #8

http://systats.or8.net/etlive/


(duke'ku) #9

maybe you should browse the source of qstat to find it. you won’t really find a complete spec for the protocol you’re looking for. if you really want to query a server, you might as well look at something that already can and figure out how it does it.


(Lanz) #10

Well since I’ve done this myself for quite a lot of game servers, here’s how:

Use udp and send the following to the server: ÿÿÿÿgetStatus

Where ÿ = ascii 255

Responce from server will be a udp datagram looking like this, but containing more info of course:

ÿÿÿÿstatusResponce#10\g_alliedMaxLives\0\g_gametype\4\g_minGameClients\0

Where #10 is ascii 10.

http://www.rtcw-tf.co.uk/gib/ <- my irc bot :moo:

If you need any more help just ask.


(red_mamba) #11

10x, I’ll try that. I’ll ask you if I run in to troubles.