Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 37

151.80.x.x dilbertplus
151.80.x.x forum
35.172.x.x forum
35.192.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.229.x.x forum
46.4.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x lgsl
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum

Last Seen

»Stefan Wed 17:17
Gagi2 Tue 04:39
tltneon Wed 17:22
Nouton^ Wed 20:07
mrstipfan Wed 10:54

Newest Members

Forums
Counter-Strike status as simple as possible
trulink
Wed Jan 27 2010, 09:03AM
Posts: 2
Joined: Wed Jan 27 2010, 08:57AM
Registered Member #5755
Hello!

I was wondering if someone have a simple counter-strike status in php ... because I googled all the web and found nothing usefull.

I just need a script that show the hostname and players/maxplayers (i dont want player names, just 10/12 for example)

n1 have it? :s


edit:

do n1 have the source of the "test page" but just for halflife? (cstrike only)
http://www.greycube.co.uk/lgsl/test/index.php


its perfectly what i need


CONNECTING TO [ IP: 216.52.148.37 ] [ C_PORT: 27015 ] [ Q_PORT: 27015 ] [ TYPE: halflife ] [ LINK ]

SUCCESS


Array
(
[s] => Array
(
[name] => iGz.HnS HideNSeek [XP Mod][NoSlow~100aa][iGzHnS.Com][Quick-Gaming.net]
[map] => de_inferno
[game] => cstrike
[players] => 9
[playersmax] => 24
[password] => 0
)

[b] => Array
(
[type] => halflife
[ip] => 216.52.148.37
[c_port] => 27015
[q_port] => 27015
[s_port] => 0
[status] => 1
)

)
Website
Rich
Wed Jan 27 2010, 09:32AM
Posts: 1717
Joined: Wed Nov 26 2003, 04:30PM

- If you are trying to learn and code your own protocol, then documentation is here:

http://developer.valvesoftware.com/wiki/Server_Queries

Take a look at the talk page for undocumented problems, bugs, and issues with the various server versions.


- If you want to want to play with raw data then, download LGSL, get the lgsl_protocol.php from the zip.

require "lgsl_protocol.php";
$server = lgsl_query_live("halflife", "IP", "PORT", "PORT", "PORT", "s");
print_r($server);


Just remember every page load will run this code, one instance for every visitor, so do not use it like this on a live website, otherwise you risk flooding the server.


- If you want a very simple display to put on your website, then install and setup LGSL, make sure its working, then on your site load the class which handles caching.

require "lgsl/lgsl_files/lgsl_class.php";
$server = lgsl_query_cached("halflife", "IP", "PORT", "PORT", "PORT", "s");
print_r($server);

Website
trulink
Wed Jan 27 2010, 10:19AM
Posts: 2
Joined: Wed Jan 27 2010, 08:57AM
Registered Member #5755
Dude, I love you.

Its exactly what I need.

Thanks a lot and sorry my nooobish aeuwaeoaew
Website
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org