Quick LFS host information on your site
Some time ago there was a request for a quick host-information feature that could be used on people's websites to display all information regarding a certain LFS host.

Because the information regarding the use of that feature got scattered all around a certain thread I thought it'd be good to create a separate sticky for it, detailing the usage :

LFS Host status feature
URL : http://www.lfsworld.net/hoststatus/?h=<HOSTNAME>
Eg. http://www.lfsworld.net/hoststatus/?h=Blackwood%20XFG%20XRG
This returns a full HTML page with header, body and footer. If you want only the body contents of the page, append &onlycontent to the url.

Hostname colour options : (add to url)
&c=1 for black
&c=2 for white
&c=3 for grey
&c=4 for blue

Turn the hostname in the result into an LFS Join link
&hostlink

Hostname URL encoding
If you want to use this feature for a host with weird characters in its name, you must "urlencode" the hostname, which means you must convert these weird characters into a format acceptable for use inside an URL. If you're having problems getting this feature to work because it keeps saying the host is offline, you may want to give the following a try.
To make it easy for you I've created a simple page where you can convert any text into urlencoded text : http://www.lfsworld.net/urlencode.html

Using custom CSS
If you want to use a custom CSS file for this feature then you can send your own CSS file to me (or post it here) and I will make it work for you and let you know how to use it.

----
Original host status thread : http://www.lfsforum.net/showthread.php?t=54366
#2 - Silox
Great! I already had been looking for it but I just couldn't find it...
Good job!
-
(MariusMM) DELETED by MariusMM : ..
nice one
keep up the good work vic...
#6 - Zalex
Really nice !

I'll make myself a page with a few frames to see all my servers in one single page. That will be really easy to see what on them in a mouse click... from anywhere !

Thanks.

Mostly same informations we get with Airio (Server State) but available on the web... so cool ! hehehe

That will be really handy for team members.

GOOD WORK !!!
Well done!

It would be cool having another div-class for the users. For now I've added DataCont to my css, but I think it would be better to have another div-container for the users.

Original Code:
...
<div id="Version" class="DataCont"><div class="Field1">Version</div><div class="Field2">0.5Z10</div></div>
<div id="Conns" class="DataCont"><div class="Field1">Conns</div><div class="Field2">1 / 47</div></div>
<div id="Users" class="DataCont"><a href="[URL="http://www.lfsforum.net/view-source:http://www.lfsworld.net/?win=stats&racer=KlausAdam"]http://www.lfsworld.net/?win=stats&racer=KlausAdam[/URL]" target="_blank">KlausAdam</a></div>
...

Wishful Thinking:
...
<div id="Version" class="DataCont"><div class="Field1">Version</div><div class="Field2">0.5Z10</div></div>
<div id="Conns" class="DataCont"><div class="Field1">Conns</div><div class="Field2">1 / 47</div></div>
<div id="Users" class="DataCont"><div class="Field3">
<a href="[URL="http://www.lfsforum.net/view-source:http://www.lfsworld.net/?win=stats&racer=KlausAdam"]http://www.lfsworld.net/?win=stats&racer=KlausAdam[/URL]" target="_blank">KlausAdam</a></div>
</div>
...

yes, I think you're correct. So I've added the extra div tags around the list of users. Shouldn't break anyone's layout i think.
fixed. Thanks for the report.
While you're on it, could you replace
<FONT COLOR=""></FONT>

with valid
<span class=""></span>

CSS:
.cc0 { color: #000 }
.cc1 { color: #F00 }
.cc2 { color: #0F0 }
.cc3 { color: #FF0 }
.cc4 { color: #00F }
.cc5 { color: #F0F }
.cc6 { color: #0FF }
.cc7 { color: #FFF }
.cc8 { color: inherit }
.cc9 { color: inherit }

maybe one day i can do that, but not right now. My colour conversion function is used by a lot of scripts so i'd have to adjust all their related css as well.
But to meet you half way I've ditched the font tags and replaced them with spans and included style="color: xxxxx;".
Thanks
Quote from Victor :maybe one day i can do that, but not right now. My colour conversion function is used by a lot of scripts so i'd have to adjust all their related css as well.
But to meet you half way I've ditched the font tags and replaced them with spans and included style="color: xxxxx;".

+1 for that Thank you.
+1 sounds good would be heaps better
-
(Flame CZE) DELETED by Flame CZE
I have one question, why doesn't this link work?

It says that the host name is too long, which is not righ, although the server is online.
It does for me.

Firefox 3.5.5.
I mean, there are some people connected and it says it's offline. Probably some encoding problem.

I'm asking because I want it for one LFS web "app" I'm currently making.
With the url encoding site (first post) I get the name:

%uFF89%uFF8Fedline%20%uFF89%uFF8Facing%207

But, with that name, I get the message:

Hostname cannot be longer than 32 characters.


The code is 42 characters long, that's 10 too much...
SumBeam: Yes, that's what I was referring to in my post.
413: Request entity too large.

Wonder how many jokes went around the CERN labs with that one.
Cool feature Victor!

But i have a little question. If i understand right, i just can use THIS html (with this infos)? So i cant "delete" infos.

I can use &hostlink to implement the new lfsjoin link. Is there a possibilty to get a blank hostinfo and with the "&commands" i can add the infos i want?

e.g.:
On www.edrx.de you see just "Track, Slots and Driver".
so i would use following link:

http://www.lfsworld.net/hostst ... rack&slots&driver

and get a html like you see on edrx.de!

Is it possible and is it desired?


(Sry, my english isnt the best, i hope i wrote it understandable! )
If you're able to use PHP then it's quite simple to get the desired behavior.


<?php 
php
    $server_info 
file_get_contents('http://www.lfsworld.net/hoststatus/?h=' urlencode('burnoutcrew.net #1 BL') . '&hostlink');
    
    
//complete Information from LfS-World
    
echo $server_info;
    
    
//Filter for Sections to delete
    
$field_delete = array('!<div id="Settings" class="DataCont">(.*?)</div></div>!',
                          
'!<div id="Version" class="DataCont">(.*?)</div></div>!');
    
$server_info_small preg_replace($field_delete""$server_info);
    echo 
$server_info_small;
?>

You only have to modify the $field_delete - array to fit your needs and of cause delete the "echo $server_info" to prevent you from getting the server listed twice
Thanks Klaus!
Works fine!

FGED GREDG RDFGDR GSFDG