Re: [TOOL] Server status picture tool.
Nice tool
You are not logged in. Please login or register.
Teeworlds Forum → Fan Art and Other → [TOOL] Server status picture tool.
Nice tool
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>
This xml thing makes it easier for developers to display serverstats with own styling. Thanks
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>
This xml thing makes it easier for developers to display serverstats with own styling. Thanks
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 ?
Yes. Nice
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;
?>
Nice, thank you.
Could you maybe provide the source code, please?
That would be nice, too.
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
(mostly made this tool since i wanted to learn some php-gd, so the code kinda looks like a playground )
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?
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/
lol. I made a snippet and cant delete it xD
Anyway, It seems like megaupload is down >_>
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.
Like this then..?
http://widget.kottnet.net/teestat/stats … amp;json=1
(Should fix so it doesn't just give errors if the server is offline...)
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
http://widget.kottnet.net/teestat/stats … amp;json=1
correct now? x)
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.
After all, I'm finished with my website:
http://lxde.lx.funpic.de/serverstats
How do you think about it?
What about implementing an 'off-line' message?
After all, I'm finished with my website:
http://lxde.lx.funpic.de
How do you think about it?
Nice
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
What about implementing an 'off-line' message?
Done.
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!
Turn it black (by default) pls! (:
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
lxde wrote:After all, I'm finished with my website:
http://lxde.lx.funpic.de
How do you think about it?Nice
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.
C00L toll
Heres my city server, its almost always full:
Welcome!
daniel, is the tool down?
daniel, is the tool down?
it seams like that
MertenNor
Hey Daniel,
N1 tool
Pls check your messages ;P
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.
Teeworlds Forum → Fan Art and Other → [TOOL] Server status picture tool.
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.