PDA

View Full Version : Want to make a Online / ofline button for our servers/hosts


Starbert
10th March 2008, 19:11
Is it possible to have online / offline buttons on your website not for drivers but for hosts / servers and how is this achieved??

the_angry_angel
10th March 2008, 19:28
Yes, this is possible. You need to query the pubstats, asking for a list of online hosts. You then iterate through the list and see if your servers are there.

In order to do this you need some sort of server side scripting.

For PHP there is the LFSWorldSDK (http://www.lfsforum.net/showthread.php?t=13328).

Starbert
10th March 2008, 19:31
I only want a couple of buttons on our site representing our servers.
Then if you click on those buttons, LFS starts and goes to those servers.

the_angry_angel
10th March 2008, 19:33
There's nobody, that I know of, who just provides this as a service for people at the moment, hence you need to create something to do it.

Starbert
10th March 2008, 19:36
Ok thanks!!:scratchch

SamH
11th March 2008, 07:05
If the LFSWorldSDK is daunting, you can alternatively talk to the host file for the server. Every time a server fires up, a hostxxxx.txt file is created, where xxxx is the port number that the server is running on. This file gives you lots of useful information about what's happening on your server.

Krammeh
11th March 2008, 09:43
I'll work on something *wink*

Krammeh
11th March 2008, 11:34
ok, I've sorted it now!

http://host.ramdonice.co.uk/HOSTNAME_HERE
(add .gif extention if required)

http://host.ramdonice.co.uk/[LTC] Live To Cruise.gif for online
http://host.ramdonice.co.uk/notonline.gif for offline

I am thinking about doing "image sets" for the near future. Let me know if this is wanted!

the_angry_angel
11th March 2008, 12:42
It looks like they're currently being served as the wrong content type Krammeh :)

Krammeh
11th March 2008, 12:45
they are?

The images themselves are currently png's, I think I'm going to convert them to GIF

the_angry_angel
11th March 2008, 12:46
Hmm.. maybe I just caught them as you were changing something, because they're displaying properly now.. Nevermind :)

Krammeh
11th March 2008, 13:00
ah well, I've converted it to .gif.

I've also made it just check them every 10 minutes, and on the fly if its not already cached :D.

So "Currently checked 725 different hostname(s)"

vane
18th March 2008, 17:23
I am a budding coder with experience of LFS_External, and wondering if i could make my own one of these :) i tried typing in my server [R-L] Cruise but it came up as red.

Krammeh
18th March 2008, 17:27
I am a budding coder with experience of LFS_External, and wondering if i could make my own one of these :) i tried typing in my server [R-L] Cruise but it came up as red.

Is the server online?

vane
18th March 2008, 18:07
it is working now, when i type in the server name e.g [R-L] Cruise it works as opposed to %5BR-L%5D%20Cruise