Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » General Jazz Jackrabbit Talk

How to display SERVER STATUS on a webpage

vBrute

JCF Member

Joined: Sep 2013

Posts: 32

vBrute is doing well so far

Nov 22, 2016, 12:21 PM
vBrute is offline
Reply With Quote
How to display SERVER STATUS on a webpage

Hi,
I am running a server and want to add the status of my server on my webpage. I have read this manual
https://www.jazz2online.com/wiki/list_servers
, but do not know how to work with the information from the port 10057, and how to display them on a webpage, the best in would be in LGSL (http://www.greycube.com/site/download.php?list.10), a server list monitoring tool, that supports a lot of games, but not Jazz Jackrabbit 2 :/
Slaz Slaz's Avatar

JCF Member

Joined: Aug 2004

Posts: 1,314

Slaz is OFF DA CHARTSlaz is OFF DA CHARTSlaz is OFF DA CHART

Nov 27, 2016, 04:33 AM
Slaz is offline
Reply With Quote
Maybe try asking someone like DZeal or Kyro directly? Things like Zstats have been made, so querying server stats is possible in some way or another.

Telnetting the listserver will also return some stats of active servers, maybe that's usable in some way.
__________________
Add SlazRabbit on Xbox Live if you want to play some GoW1/2/3/J or Destiny1/2.
Jazz Jackrabbit 2 Forever!!
Civilian Defence Force - Jazz2 Visual Fantasers
Darkhog Darkhog's Avatar

JCF Member

Joined: May 2012

Posts: 227

Darkhog is notorious for his worthless posts

Nov 28, 2016, 11:52 AM
Darkhog is offline
Reply With Quote
It'd be best if listserver would also run small HTTP server that would serve list of active servers and their data as a JSON or similar. Then making web widget for that kind of stuff would be literally as easy as parsing a JSON.
__________________
Code:
    .──.
   │O_O │
   ││_╱ │
  ╱╱   │╲
 (|▔╲  │ )
╱'╲_▔ _╱`╲
╲___) (___╱  TUX LOVES YOU.
vBrute

JCF Member

Joined: Sep 2013

Posts: 32

vBrute is doing well so far

Nov 29, 2016, 12:33 PM
vBrute is offline
Reply With Quote
there are not very much info about it at the jj2 wiki, I was not in touch with Kyro for a long time and do not know the others, so I thought post a thread here is the best way to get attention, mostly the plus patch developers.

there is a way to embed the digiex serverlist to a webpage, this is not a problem, if it is still functional, did not try it http://digiex.net/guides-reviews/gui...your-site.html

but I want to display only my server and read the status of it directly from the server, not from listservers and the best and easiest way for it would be to write a protocol for LGSL, that I mentioned in first post, it supports a lot of games, and is free for everybody, all is premade, only a protocol for jj2, that is a few lines long is missing, I have written on LGSL forum too, so hope we can manage to make it work
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 864

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Nov 29, 2016, 03:58 PM
Seren is offline
Reply With Quote
Quote:
Originally Posted by vBrute View Post
I have read this manual
https://www.jazz2online.com/wiki/list_servers
, but do not know how to work with the information from the port 10057
Quote:
Originally Posted by vBrute View Post
but I want to display only my server and read the status of it directly from the server, not from listservers
So far these are contradictory, so perhaps you should make it clear what you want first if you want your problem solved.

Ports 10053-10059 are used exclusively for communication with the list servers. If you want to bypass communication with the list servers, that is definitely possible, but communication with the server can only be done using functionality of port 10052. The actual port can be different if you're running JJ2+, but you can only communicate using packets that JJ2 expects from that port. Port 10052 is the one JJ2 uses for communication between two game instances. It does not have special functionality for retrieving server data by non-players, because such data is instead obtained from the list servers. This means that to obtain any information about the server other than whether it is online or not, you will have to create a ghost player that joins the server and collects such data (which will not work if the server is full).

The same approach is used by SGIP. First it uses ports 10053-10057 to obtain the server list, and then port 10052 (or other depending on server) to send a ghost player to each server in order to obtain the player list. This is why retrieving player lists fails if the server is full, or if the bot's IP is banned.
__________________

I am an official JJ2+ programmer and this has been an official JJ2+ statement.
vBrute

JCF Member

Joined: Sep 2013

Posts: 32

vBrute is doing well so far

Nov 30, 2016, 01:03 AM
vBrute is offline
Reply With Quote
Elementaler ahaa, thank you for the info, now i am wiser, I just did not understand that the port 10057 is just for listservers. So there is no way that a php script could listen to ports 10053-59 directly?
I mean, in fact i do not care where are the info from, if they are from the game or from listserver, but my logic said, it would be easier directly from the game and if the listserver is down, status is still working independent from other servers, hope u understand
it is kind of strange thing though, that jj2 needs a fake player to retrieve the list of players, is it possible using php?
vBrute

JCF Member

Joined: Sep 2013

Posts: 32

vBrute is doing well so far

Jan 9, 2017, 12:34 AM
vBrute is offline
Reply With Quote
Hello,
Wussie, the protocol developer of LGSL is making the JJ2 status protocol, but need ssome help. Could someone from the Plus Patch developers help him to understand how to display the server response into human readable form

His answer:

"Ok, got the chance to try the scripts you provided.
Sadly, the file example.php only throws this error when querying any server:
"The server has sent an unexpected response. This situation may have happened because:
a. The server is full;
b. this webserver is banned;
c. the server has its version erroneously listed;
d. other."

I figured out how to get a server response for LGSL, but all I can understand from it is the level name and I need more information on how to translate the rest into a human readable form. Any help there? "

http://www.greycube.com/site/e107_pl...php?18722.last
__________________
admin of BRUT.me
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,978

Violet CLM has disabled reputation

Jan 9, 2017, 11:40 AM
Violet CLM is offline
Reply With Quote
I passed the question onto DJazz, who may be able to take a look in a few days.
__________________
Stijn Stijn's Avatar

Administrator

Joined: Mar 2001

Posts: 6,964

Stijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to behold

Jan 9, 2017, 11:45 AM
Stijn is offline
Reply With Quote
There is no standardised method to query servers themselves. You can get some info on currently live servers by querying the server list via port 10057, e.g. list1.digiex.net:10057.

Any scripts that provide more info join and then quickly quit a server with an "invisible" user to see who's inside, what level is being played, etc. Obviously that's a lot more complex to set up.
vBrute

JCF Member

Joined: Sep 2013

Posts: 32

vBrute is doing well so far

Jan 14, 2017, 10:08 AM
vBrute is offline
Reply With Quote
@VioletThank you, hope he will answer soon in a positive manner

@Stijn but how to do it the most easier way? how the serverlist querries the server?
__________________
admin of BRUT.me
vBrute

JCF Member

Joined: Sep 2013

Posts: 32

vBrute is doing well so far

Feb 20, 2017, 08:57 AM
vBrute is offline
Reply With Quote
OK, just to let You know, the server status of Jazz Jackrabbit 2 in LGSL is finished and works perfect... thanx to Wussie
__________________
admin of BRUT.me
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 02:42 PM.