Game Server Status Information

General discussion about Life is Feudal MMO and Life is Feudal: Your Own, The main section and backbone of the forums.

Shen
 
Posts: 13
Joined: 21 Sep 2014, 08:08

Game Server Status Information

Post by Shen » 27 Sep 2014, 16:47

Hey,
I would like to setup a php statuspage for my dedicated server. I searched through the Database but didn't find any useful information. Only a list of all players, who visited the server since beginning...

I am looking for data like they are shown in the server-selection area: Servername, active Players (incl. list of Playernames who are currently logged in), Ping, Uptime, server settings (e.g. skill progression, crafting,....).
Are these information saved somewhere in the local database?


Alfie
Alpha Tester
 
Posts: 110
Joined: 06 Aug 2012, 23:09
Location: England, Birmingham

Re: Game Server Status Information

Post by Alfie » 27 Sep 2014, 19:35

Shen wrote:Hey,
I would like to setup a php statuspage for my dedicated server. I searched through the Database but didn't find any useful information. Only a list of all players, who visited the server since beginning...

I am looking for data like they are shown in the server-selection area: Servername, active Players (incl. list of Playernames who are currently logged in), Ping, Uptime, server settings (e.g. skill progression, crafting,....).
Are these information saved somewhere in the local database?


You can get a lot of the information from querying the server (Source Query).
https://developer.valvesoftware.com/wiki/Server_queries

There are multiple classes available in various languages for the above. PHP class: https://github.com/xPaw/PHP-Source-Query-Class

You can easily grab server name, settings and player count. Don't seem to be able to get an active list of players by name (only seem to be able to get back the length of time they've been on - haven't toyed enough with it but I have a feeling that was intentionally done or perhaps just a bug).

I threw this together which should give you an idea of the possibilities (auto refreshing #32 server status - basic stuff):
http://www.anquer-quare.com/lif/

I haven't had a chance to really look at the server database so I can't comment on what you can pull out of that.

Hope the above points you in the right direction.
Anquer Quare
www.Anquer-Quare.com | www.AQServers.com

Forgive your enemies, but never forget their names.
John F Kennedy
____________________________________________________________________________________________


Shen
 
Posts: 13
Joined: 21 Sep 2014, 08:08

Re: Game Server Status Information

Post by Shen » 28 Sep 2014, 06:55

Thank you!

I downloaded the class and tried to use the view.php.
I changed 'SQ_SERVER_PORT' to '28000' and executed the script but I only get 'No information received'.

Do I have to change some other settings?


Alfie
Alpha Tester
 
Posts: 110
Joined: 06 Aug 2012, 23:09
Location: England, Birmingham

Re: Game Server Status Information

Post by Alfie » 28 Sep 2014, 08:31

Shen wrote:Thank you!

I downloaded the class and tried to use the view.php.
I changed 'SQ_SERVER_PORT' to '28000' and executed the script but I only get 'No information received'.

Do I have to change some other settings?


The query port is the game port + 2

So if your game port is 28000, the query port is 28002
Anquer Quare
www.Anquer-Quare.com | www.AQServers.com

Forgive your enemies, but never forget their names.
John F Kennedy
____________________________________________________________________________________________


Shen
 
Posts: 13
Joined: 21 Sep 2014, 08:08

Re: Game Server Status Information

Post by Shen » 28 Sep 2014, 10:40

Alfie wrote:The query port is the game port + 2

So if your game port is 28000, the query port is 28002

I already tried this, but no success. Port 28000-28002 is open.


Alfie
Alpha Tester
 
Posts: 110
Joined: 06 Aug 2012, 23:09
Location: England, Birmingham

Re: Game Server Status Information

Post by Alfie » 28 Sep 2014, 10:42

Shen wrote:
Alfie wrote:The query port is the game port + 2

So if your game port is 28000, the query port is 28002

I already tried this, but no success. Port 28000-28002 is open.


Hmm. What's your IP (and from the above I assume your game port is 28000)?
Anquer Quare
www.Anquer-Quare.com | www.AQServers.com

Forgive your enemies, but never forget their names.
John F Kennedy
____________________________________________________________________________________________


Shen
 
Posts: 13
Joined: 21 Sep 2014, 08:08

Re: Game Server Status Information

Post by Shen » 28 Sep 2014, 11:08

Ah, got it. I didn't change 'localhost'. Now I added my dyn-dns and it works :Yahoo!:

But getting the players id would be nice...but I didn't find these information, too.


Alfie
Alpha Tester
 
Posts: 110
Joined: 06 Aug 2012, 23:09
Location: England, Birmingham

Re: Game Server Status Information

Post by Alfie » 28 Sep 2014, 11:12

Shen wrote:Ah, got it. I didn't change 'localhost'. Now I added my dyn-dns and it works :Yahoo!:


Good to hear!
Anquer Quare
www.Anquer-Quare.com | www.AQServers.com

Forgive your enemies, but never forget their names.
John F Kennedy
____________________________________________________________________________________________


Xtoor
 
Posts: 4
Joined: 08 Dec 2014, 20:20

Re: Game Server Status Information

Post by Xtoor » 14 Dec 2014, 04:57

Hey Shen would you like to share that php script setup im also looking to setup a server status but im not too fancy with php tho.

User avatar
Gorgo
 
Posts: 22
Joined: 05 Nov 2014, 10:16

Re: Game Server Status Information

Post by Gorgo » 16 Dec 2014, 11:37

Did you search something like this : www.real-world.be ?
Image

Return to General Discussion

cron