Jump to content
Ghost Recon.net Forums

PHP - Realtime GR Server Query


Recommended Posts

Hi,

Ive developed a PHP script that queries a Ghost Recon Server (given an ip address) and gives you all the nice information like:

1) Game Version

2) Server Name

3) Current Map

4) Current Mission Name

5) Game Type

6) Password locked

7) Max Players

8) List of current players & their team colours

9) What Mods a running

10) If its a dedicated server running or not

11) Game Status (Joining, debriefing etc)

etc.... (you get the idea)

I'm not a PHP expert, so I'm looking for someone that has an interest in this and knows PHP pretty well...

I've got 99% of the code written and working, but I need someone to help "tidy" up my code and see if I have used PHP the way it should be.

I think this will be of great use to people that run dedicated servers/web sites because they can query whatever server they like and find out who's playing, what they are playing etc... just like UBI/Gamespy, but with this PHP script you could customise it to suit your site.

If anyone is interested in lending a hand, please email me flybar@ntlworld.com

Thanks (PS... Sorry if this is in the wrong forum)

Link to post
Share on other sites

Seems to work great!

GameVersion:1.4:

servername:The SRS - 100MBit:

mapname:D06 Ghost Town:

Missionname:D06 - Spectre Wind:

Game Type:Siege:

Password :no:

Max Players:35:

Current players :16:

players:Array ( [0] => Server Admin [1] => Deathjam [2] => [OGzr]Vaulden [3] => Saxman [4] => BOSS302 [5] => Lord-aoshi [6] => [O] BIN SWEDEN [7] => Hollow [8] => *GENERAL**PAIN* [9] => =WI= TopGun [10] => PFC. Gomer Pyle [11] => Maineac^VRNS [12] => =WI= BUCKNUTS [13] => Night Viper [14] => VoD_Blitzkrieg [15] => PorkChop[]VRNS )

Game Mods:\mods\mp1;\mods\mp2;:

Dedicated:yes:

time running:507.33102417:

Gamestatus:Playing:

Message of the day:IP. 66.250.220.30 LIVE stats available at: www.stats.special-recon-service.com:

Spawn type:Individual:

Game Time:600:

Time Remaining: 92.66897583:

Team Colors:array(16) { [0]=> string(6) "Yellow" [1]=> string(6) "Yellow" [2]=> string(5) "Green" [3]=> string(5) "Green" [4]=> string(5) "Green" [5]=> string(5) "Green" [6]=> string(5) "Green" [7]=> string(6) "Yellow" [8]=> string(10) "Unassigned" [9]=> string(6) "Yellow" [10]=> string(10) "Unassigned" [11]=> string(6) "Yellow" [12]=> string(10) "Unassigned" [13]=> string(10) "Unassigned" [14]=> string(10) "Unassigned" [15]=> string(7) "Unknown" }

timer on:no:

Autostart:0:

min:0

max:10

safe:0

Spawn Count:3:

Observer:no:

startwait:0:

Reticule:Names:

Threat:OFF:

Kit Restrictions:no_sensors.kil:

All you need to do now is lay that information out in a nice table or something. Nice work!

edit> LOL check out the smiley, how did that happen?!

Edited by Rocky
Link to post
Share on other sites

I already have this sciript, but it works with Qstat program.

Its not much, but display everything you wish :

- players

-maps

- mods

- server name

....

Give me a day or two and i will show you. I'm having some comp problems. :wall::wall:

Link to post
Share on other sites

This script uses PHP only, it doesnt require you to run an executable in the background.

Some web hosters wont let you run .exe's, so this does not use qstat.

If you look at the beta version (see URL above) I'm looking for someone that knows PHP very well... I only learnt what I need to know to get the program to work. I would like someone to verify the code, so that it has all the error trapping and stuff on it.

Also, like Rocky says, it would be nice to wrap a user interface around this in such a way that any clan could design a template and use the script.

Edited by flybar
Link to post
Share on other sites
This script uses PHP only, it doesnt require you to run an executable in the background.

Some web hosters wont let you run .exe's, so this does not use qstat.

If you look at the beta version (see URL above) I'm looking for someone that knows PHP very well... I only learnt what I need to know to get the program to work. I would like someone to verify the code, so that it has all the error trapping and stuff on it.

Also, like Rocky says, it would be nice to wrap a user interface around this in such a way that any clan could design a template and use the script.

Basiclly like our server stats, i also recieved your application for that today.

like i said SRS_Hawk is amazing at php, he made that whole thing, including scripts and templates on his own... ask him.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...