View Full Version : little host script
bunder9999
21st February 2009, 05:11
i'm trying to find some code that i can use on my website to probe lfsworld for data about my servers... nothing big, just what track it's on and how many people are racing... php or html is good.
kinda like this (http://hot.german-gamers-club.de/index.php?id=16&lang=0) (which i found in the sticky)
there's probably one in here but i suck at searching... :D
thanks
oldnavy
21st February 2009, 08:54
Here you are http://www.lfsforum.net/showthread.php?t=16212&highlight=tracker
bunder9999
21st February 2009, 13:41
:D
thanks
bunder9999
23rd February 2009, 04:43
i looked at HoTTracker... it seems too elaborate for what i need (lfsw player/team stats?). plus it appeared to be broken, it said my XFR server was a MRT server... :shrug:
i got one of the php lfs sdk deals working, but i still need a way to put that data into a working webpage... :shrug:
Victor
24th February 2009, 04:33
Well, I was making this not too long ago : http://www.lfsworld.net/hoststatus/?h=Blackwood%20XFG%20XRG but never finished it because there wasn't really a lot of interest. Or maybe I posted it in the wrong thread : http://www.lfsforum.net/showthread.php?p=1017787#post1017787 (read from that post onwards).
It's fairly easy for me to finish it, if that's what you were looking for.
HorsePower
24th February 2009, 08:40
The old HoT Tracker is indeed kind of outdated. The good thing is that it didn't need MySQL if you only wanted to show online mates and server status.
Currently I'm developing a new release of the HoT Tracker which is much bigger (and needs MySQL), but should be easier to install and to use.
The real benefit of it is that someone can install it and others can use the functionality (e.g. server status) remotely! Currently I'm running kind of a beta test, i.e. I have the new tracker running on my private webspace and my clan is using the remote server status (simply including a script).
This is what the server status now looks like:
http://www.g-g-c.de/index.php?uid=server&show=lfs
The new tracker allows to configure the look of the server status (i.e. which fields to display, which texts to show) individually. The same holds for colors.
The new tracker should have been released already but as you might know, real life is more important and recently I had not much time to finish the remaining 5% of the tracker. Very few things need to be done (including documentation), so I hope I will be able to release it during march. But don't nail me down in that.
bunder9999
24th February 2009, 08:53
Well, I was making this not too long ago : http://www.lfsworld.net/hoststatus/?h=Blackwood%20XFG%20XRG but never finished it because there wasn't really a lot of interest. Or maybe I posted it in the wrong thread : http://www.lfsforum.net/showthread.php?p=1017787#post1017787 (read from that post onwards).
It's fairly easy for me to finish it, if that's what you were looking for.
OOH! yes... that's what i'm looking for... i tried it on my servers but it didn't work... unless i fudged the URL... :shrug:
edit: i did. didn't add the color tags. :D
OldBloke
24th February 2009, 09:52
Well, I was making this not too long ago : http://www.lfsworld.net/hoststatus/?h=Blackwood%20XFG%20XRG but never finished it because there wasn't really a lot of interest. Or maybe I posted it in the wrong thread : http://www.lfsforum.net/showthread.php?p=1017787#post1017787 (read from that post onwards).
It's fairly easy for me to finish it, if that's what you were looking for.
Yes please. Not sure if it's already there but please add a list of racers currently on the server too :thumb:
Flame CZE
24th February 2009, 16:58
Yes, Victor, it will be pretty useful for me and my tem website too. :)
Victor
24th February 2009, 18:01
alright. I think the only thing I had to do left is create some form of default look.
Or perhaps I should keep it like this - in the end you can give me a css file anyway, so you can make the info fit the looks of your page. So check the css file of that page and adapt it to your needs, then give it to me and I'll make it work for you.
(perhaps this can help you as well https://addons.mozilla.org/en-US/firefox/addon/60 for inline css editing or google for something similar if you don't use firefox)
OldBloke - users are listed, just find a host with people on it :)
OldBloke
24th February 2009, 18:28
alright. I think the only thing I had to do left is create some form of default look.
There might be a bit more :)
We are currently running two servers:
Dead Men Racing and Dead Men Racing D
If I try the following links although the server name appears to be correct the rest of the info displayed is that for Dead Men Racing D (our demo server).
http://www.lfsworld.net/hoststatus/?h=Dead%20Men%20Racing
and
http://www.lfsworld.net/hoststatus/?h=Dead%20Men%20Racing%20D
bunder9999
24th February 2009, 18:33
gotta add the ^3 etc code to the url... that's what i had to do. :shrug:
OldBloke
24th February 2009, 18:52
gotta add the ^3 etc code to the url... that's what i had to do. :shrug:
Ah. Of course. Apologies :shy:
Flame CZE
24th February 2009, 19:30
Could you please make the CSS so the host name is always in black colour?
hotmail
24th February 2009, 19:33
Ey victor,
i am also using the code you made on our website, i only have a little problem with it.
because we are using a white coloured name it shows white on that page, but the back ground is also white,
is there anychance that we can have a ?c=black or ?c=1
what will mean that the host name is black.
Greats,
Reint Jan
bunder9999
24th February 2009, 19:34
Could you please make the CSS so the host name is always in black colour?
but my webpage is black, wouldn't that make it invisible? :shrug:
edit:
is there anychance that we can have a ?c=black or ?c=1
i like that sort of option better... :shrug:
hotmail
24th February 2009, 19:36
but my webpage is black, wouldn't that make it invisible? :shrug:
my solution would work for you:tilt::razz:
Flame CZE
24th February 2009, 19:36
but my webpage is black, wouldn't that make it invisible? :shrug:
He said he could make several CSS sheets, didn't he?
Or perhaps I should keep it like this - in the end you can give me a css file anyway, so you can make the info fit the looks of your page. So check the css file of that page and adapt it to your needs, then give it to me and I'll make it work for you.
bunder9999
24th February 2009, 19:38
yeah, but i'm too much of a noob to use css. as long as he doesn't change the default i'm happy... :D
hotmail
24th February 2009, 21:02
He said he could make several CSS sheets, didn't he?
i am afraid i cant set this up in the css.
because he first look at css after that at special addons,
<div class="HostName"><FONT COLOR="#FFFFFF">Concept Racing Public</FONT></div>
ass you can see the <FONT COLOR="#FFFFFF"> is a special addon here.
Flame CZE
25th February 2009, 14:41
Good job Victor, now I'm using it on my team website (http://www.grand.tym.sk/), thanks! :thumb:
Victor
25th February 2009, 14:50
ok I've added the &c option for alternate hostname colours (but taking out the actual host colouring).
&c=1 for black
&c=2 for white
&c=3 for grey
&c=4 for blue
if you need another colour, just let me know
Additionally you don't need to include the colour tags in the host name anymore to use this.
Flame CZE
25th February 2009, 15:20
Thanks, it's useful :)
hotmail
25th February 2009, 17:03
ok I've added the &c option for alternate hostname colours (but taking out the actual host colouring).
&c=1 for black
&c=2 for white
&c=3 for grey
if you need another colour, just let me know
Additionally you don't need to include the colour tags in the host name anymore to use this.
Very very nice,
Thanks A lot:nod:
OldBloke
25th February 2009, 17:50
Excellent. Many thanks :thumb:
bunder9999
26th February 2009, 09:30
hey vic... a little feature request?
for autocross servers all it says under track is "autocross autocross"... could it also show the current running layout?
thanks
Victor
26th February 2009, 13:30
Our system doesn't know anything about the layout you run, so I can't show it.
bunder9999
26th February 2009, 13:49
Our system doesn't know anything about the layout you run, so I can't show it.
bummer. was worth a shot. :shrug:
Whiskey
26th February 2009, 14:57
I dont know much about these things, but I have a bug report.
The # is like a comment, so after its position the server name is ignored.
And so many servers has this character, for instance, to difference server 1 and 2.
Is there any way to fix, o avoid that problem?
Victor
26th February 2009, 15:05
There are a number of characters that need to be encoded for use in an url, including #.
Use this page to convert any hostnames for use in urls : http://www.lfsworld.net/urlencode.html
Whiskey
26th February 2009, 15:49
Thank you very much. That page would be very useful for me :thumb:
master_lfs.5101
26th February 2009, 23:38
Could someone please help me implent this into my website? Thanks!
How would I do this too?
bunder9999
26th February 2009, 23:44
Could someone please help me implent this into my website? Thanks!
How would I do this too?
<table style="bgcolor: rgb(0, 0, 0);" width="15%" border="1" cellpadding="2" cellspacing="2">
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20TBO-mini" ?></td></tr>
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20XFR-mini" ?></td></tr>
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20RB4-bnj" ?></td></tr>
</table>works for me. :shrug:
master_lfs.5101
26th February 2009, 23:53
<table style="bgcolor: rgb(0, 0, 0);" width="15%" border="1" cellpadding="2" cellspacing="2">
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20TBO-mini" ?></td></tr>
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20XFR-mini" ?></td></tr>
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20RB4-bnj" ?></td></tr>
</table>works for me. :shrug:
So i would have to use php? Or HTML?
bunder9999
27th February 2009, 00:02
So i would have to use php? Or HTML?
the filename would have to be .php in order for the web server to execute <?php ?> tags. :thumb:
master_lfs.5101
27th February 2009, 04:26
Thanks bunder. Don't know much of php but i know html pretty well.
Victor
27th February 2009, 06:11
<table style="bgcolor: rgb(0, 0, 0);" width="15%" border="1" cellpadding="2" cellspacing="2">
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20TBO-mini" ?></td></tr>
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20XFR-mini" ?></td></tr>
<tr><td><?php include "http://www.lfsworld.net/hoststatus/?h=^2bunbun's%20funfun%20RB4-bnj" ?></td></tr>
</table>works for me. :shrug:
It may work, but it's really wrong. The hoststatus pages are HTML pages on their own. If you look at the source code of a hoststatus page you'll see it has a document type, HTML, HEAD, BODY, etc. A whole html page.
You cannot just put that inside a table.
Instead, use an iframe to load the hoststatus into. (google it if you don't know what it is).
bunder9999
27th February 2009, 06:16
ewww frames.
yeah, i know it's wrong... but who cares about w3c compliance... i sure don't. :D
Flame CZE
27th February 2009, 06:35
Yes, I use them as iframes:
<iframe src="http://www.lfsworld.net/hoststatus/?h=Grand%20Layout%20Server%201&c=1" width="530" height="100" scrolling="no" frameborder="0"></iframe>
Victor
27th February 2009, 08:39
ewww frames.
yeah, i know it's wrong... but who cares about w3c compliance... i sure don't. :D
Then at least append &onlycontent to the urls, so that you only get the actual host status tags, leaving out the full-page tags.
You may have to copy the css bits into your page though, to make the host status data look good.
bunder9999
27th February 2009, 08:57
Then at least append &onlycontent to the urls, so that you only get the actual host status tags, leaving out the full-page tags.
You may have to copy the css bits into your page though, to make the host status data look good.
i hate css too... but since you suggested it, that's what i did. :(
edit: yes, i'm super picky.
bunder9999
8th October 2009, 14:49
ok I've added the &c option for alternate hostname colours (but taking out the actual host colouring).
&c=1 for black
&c=2 for white
&c=3 for grey
if you need another colour, just let me know
Additionally you don't need to include the colour tags in the host name anymore to use this.
&c=4 for blue has been added by vic. many thanks. :)
edit:
&hostlink has been added by vic, to allow for join2lfs integration. thanks again. :)
Knuddlbaer
10th November 2009, 23:14
Is it possible to add - for example - &php als parameter to get this output ?
$mode="Demo, Qualification 15 minutes";
$track="Blackwood GP";
$hostname='Colored Host with font tags';
$hostname_clean = 'LFS Hostname';
$settings = '...';
etc.
This will give more control how to place the content.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.