26

Re: [TOOL] Server status picture tool.

http://widget.kottnet.net/teestat/stats.php?ip=217.151.49.239&port=8310

Nice tool smile

Bye.

27

Re: [TOOL] Server status picture tool.

Daniel wrote:

Like this?
http://widget.kottnet.net/teestat/stats … &xml=1

(cba reading about XML atm..)

Thats almost correct, but its not a valid XML file.

Just add this to the top and its valid:

<?xml version="1.0" encoding="UTF-8"?>

The end-tag at <mapname> is wrong, it is just </map>, should me </mapname> smile

This xml thing makes it easier for developers to display serverstats with own styling. Thanks smile

28 (edited by Daniel 2009-07-02 22:11:18)

Re: [TOOL] Server status picture tool.

eigan wrote:
Daniel wrote:

Like this?
http://widget.kottnet.net/teestat/stats … &xml=1

(cba reading about XML atm..)

Thats almost correct, but its not a valid XML file.

Just add this to the top and its valid:

<?xml version="1.0" encoding="UTF-8"?>

The end-tag at <mapname> is wrong, it is just </map>, should me </mapname> smile

This xml thing makes it easier for developers to display serverstats with own styling. Thanks smile

Why the f*** does it open with <? making the server think its PHP code resulting in parsing error?

My "jommpalösning": <?echo '<?xml version="1.0" encoding="UTF-8"?>';?>
Yes, that's right, lol!

http://widget.kottnet.net/teestat/stats … &xml=1
Is it correct now tongue?

29

Re: [TOOL] Server status picture tool.

Yes. Nice smile

Here is a very simple example for PHP users:

<?php
$server = simplexml_load_file('- link to the xml file-');

// $server->[field] where field is one of: name, ip, port, map, gametype, players, or maxplayers
echo 'Server name: ' . $server->name . '<br />';
echo 'Players online: ' . $server->players;
?>

30

Re: [TOOL] Server status picture tool.

Nice, thank you.
Could you maybe provide the source code, please?
That would be nice, too.

31 (edited by Daniel 2009-07-03 14:26:21)

Re: [TOOL] Server status picture tool.

I used this code to get the info from servers:
http://www.teeworlds.com/forum/viewtopic.php?id=4320

And then i used php-gd to make pictures out of the stats, just tell me if you want that code too, rather won't post it here since it's so ******* ugly coded big_smile

(mostly made this tool since i wanted to learn some php-gd, so the code kinda looks like a playground tongue)

32

Re: [TOOL] Server status picture tool.

Thanks for the link.
It would be nice if you would post the code which generates the xml-output.
I would try to make it also generating JSON.
I wonder if I could get the server list from the master server through php.
I don't have an own server. Could you maybe host the code for generating JSON?

33

Re: [TOOL] Server status picture tool.

lxde wrote:

Thanks for the link.
It would be nice if you would post the code which generates the xml-output.
I would try to make it also generating JSON.
I wonder if I could get the server list from the master server through php.
I don't have an own server. Could you maybe host the code for generating JSON?

http://widget.kottnet.net/teestat/stats … amp;json=1

The code to get xml/json output is:
http://teeworlds019.pastebin.com/

34

Re: [TOOL] Server status picture tool.

lol. I made a snippet and cant delete it xD

Anyway, It seems like megaupload is down >_>

35

Re: [TOOL] Server status picture tool.

Thank you very much for putting the code online.

Unfortunately I've made some mistake in my JSON post (one comma too much at the end),
but I corrected it already.
I looked at your code for JSON on pastebin.com and found another mistake:
There also have to be quotation marks around the name, like
"name": "6on6 BattleTees 1 (Qi Clanserver)"
and there should be no comma behind the last entry before the closing "}".
I tryed to correct it, but i don't know how to output single quotation marks in PHP.

36 (edited by Daniel 2009-07-04 20:46:33)

Re: [TOOL] Server status picture tool.

Like this then..?
http://widget.kottnet.net/teestat/stats … amp;json=1
tongue

(Should fix so it doesn't just give errors if the server is offline...)

37 (edited by lxde 2009-07-05 11:56:43)

Re: [TOOL] Server status picture tool.

The output itself is correct,
but I corrected it again,
because I discovered that JSON files should have the MIME Content-Type "application/json".
Additionally, it should output nothing now if the server is incorrect.

Edit: The corrected code is at pastebin.com

38

Re: [TOOL] Server status picture tool.

http://widget.kottnet.net/teestat/stats … amp;json=1
correct now? x)

39 (edited by lxde 2009-07-13 14:52:40)

Re: [TOOL] Server status picture tool.

Yes, thats correct.
I would like to ask, if you could integrate a function
to set the font color and the background color over the url, maybe like this:
http://http://widget.kottnet.net/teesta … ;bg=ff0000

Btw, I'm programming a website where you could input servers and add them as favorites,
so that they're displayed each time you visit the webpage (I do this through cookies).
I'll soon put it online and the link here.

Edit: Sorry for my late answer.
Edit:Edit:The &color parameter is unnecessary, because the image is transparent.

40 (edited by lxde 2009-07-14 10:42:01)

Re: [TOOL] Server status picture tool.

After all, I'm finished with my website: big_smile big_smile big_smile
http://lxde.lx.funpic.de/serverstats
How do you think about it?

41 (edited by Slinack 2009-07-13 18:00:30)

Re: [TOOL] Server status picture tool.

What about implementing an 'off-line' message?

check out these maps: infiltrate - choco - dustycloud

42

Re: [TOOL] Server status picture tool.

lxde wrote:

After all, I'm finished with my website: big_smile big_smile big_smile
http://lxde.lx.funpic.de
How do you think about it?

Nice smile
Maybe we can implent it to stats.teesites.net to get a nicer url since there isnt really anything there x.x?

also: http://widget.kottnet.net/teestat/stats … lor=ffffff smile

Slinack wrote:

What about implementing an 'off-line' message?

Done.

43 (edited by Slinack 2009-07-13 19:07:56)

Re: [TOOL] Server status picture tool.

Daniel wrote:
Slinack wrote:

What about implementing an 'off-line' message?

Done.


You mean a white 'Server not Found' message?
I couldn't read it until I downloaded the image.

Everything went white! tongue
Turn it black (by default) pls! (:

check out these maps: infiltrate - choco - dustycloud

44 (edited by Daniel 2009-07-13 19:28:02)

Re: [TOOL] Server status picture tool.

Oh ****, i did something messed up when adding the color-function x.x, should be fixed now.

(apparently set the default color to white, lol)

Please refrain from using unnecessary curse / strength words. // ~{MS}~ Azon

45

Re: [TOOL] Server status picture tool.

Daniel wrote:
lxde wrote:

After all, I'm finished with my website: big_smile big_smile big_smile
http://lxde.lx.funpic.de
How do you think about it?

Nice smile
Maybe we can implent it to stats.teesites.net to get a nicer url since there isnt really anything there x.x?

I would really like it if you implement it into you website when it is finished.
Just write here or use the "contact"-form if you have suggestions, improvements or ideas.

46

Re: [TOOL] Server status picture tool.

C00L toll big_smile

Heres my city server, its almost always full:

http://widget.kottnet.net/teestat/stats.php?ip=217.151.49.239&amp;port=8309

Welcome!

47

Re: [TOOL] Server status picture tool.

daniel, is the tool down? hmm

check out these maps: infiltrate - choco - dustycloud

48

Re: [TOOL] Server status picture tool.

Slinack wrote:

daniel, is the tool down? hmm

it seams like that sad

MertenNor

->My 24/7 servers: [NOR] Norwegian HUB <- Back Online !! big_smile
( My grammar is getting better ! smile I think.. )
-Norway

49

Re: [TOOL] Server status picture tool.

Hey Daniel,

N1 tool wink

Pls check your messages ;P

50

Re: [TOOL] Server status picture tool.

Server is down for now - should be up within a day or so though, there's a chance that all my data is gone though so i'll have to rewrite (parts of) the tool if that's the case...

BadMatt: it's written in PHP+PHP GD also used http://www.teeworlds.com/forum/viewtopic.php?id=3587 to get server informations.