fodev.net

FOnline Development => General Discussion => Topic started by: Mr Feltzer on January 15, 2013, 01:22:15 pm

Title: Server Status checker
Post by: Mr Feltzer on January 15, 2013, 01:22:15 pm
Hey Folks, I lost the link to the Status Checker. can somebody hit me up please?

Thanks, Much appreciated
Title: Re: Server Status checker
Post by: Wipe on January 15, 2013, 02:28:54 pm
http://temote.pl/index.php?id=projects ?
Title: Re: Server Status checker
Post by: elqoro on January 15, 2013, 09:21:24 pm
http://temote.pl/index.php?id=projects ?

Link for generator not work.
Title: Re: Server Status checker
Post by: Mr Feltzer on January 16, 2013, 01:33:48 am
http://temote.pl/index.php?id=projects ?

Quote
Not Found

The requested URL /status_generator.html was not found on this server.

:(
Title: Re: Server Status checker
Post by: Wipe on January 16, 2013, 07:10:48 am
Oh well. You can always re-use already uploaded copy with your own settings :P Everything written with big letters need to be replaced with proper values
Quote
http://fonline-status.ru/status.php?s=SERVER&p=PORT&alpha=black&c_r=COLOR_R&c_g=COLOR_G&c_b=COLOR_B&txt_x=20

Alternatively, ask jan0s1k to upload generator somewhere, it's always better to have some fancy UI.
Title: Re: Server Status checker
Post by: Mr Feltzer on January 16, 2013, 07:16:35 am
Oh well. You can always re-use already uploaded copy with your own settings :P Everything written with big letters need to be replaced with proper values
Alternatively, ask jan0s1k to upload generator somewhere, it's always better to have some fancy UI.

ah right thanks
Title: Re: Server Status checker
Post by: jan0s1k on January 20, 2013, 06:10:22 pm
Check again, should be working now (at least that generator page).
Title: Re: Server Status checker
Post by: JovankaB on January 20, 2013, 06:53:49 pm
I tried it and it says "Service Temporarily Unavailable"
Title: Re: Server Status checker
Post by: jan0s1k on January 22, 2013, 03:34:46 pm
I tried it and it says "Service Temporarily Unavailable"
It seems, that the one, who cvet gave that script has some problem with php. Here's same script on my server :P
http://sc.temote.pl/index.php
http://sc.temote.pl/generator.htm
Title: Re: Server Status checker
Post by: JovankaB on January 22, 2013, 04:56:03 pm
It seems, that the one, who cvet gave that script has some problem with php. Here's same script on my server :P
http://sc.temote.pl/index.php
http://sc.temote.pl/generator.htm

The person who was hosting fonline.ru disappeared mysteriously a few months ago.
I guess that's where was the script. Anyway, thanks - it works now :)
Title: Re: Server Status checker
Post by: Mr Feltzer on January 23, 2013, 03:15:56 am
Ah Sweet. Thanks
Title: Re: Server Status checker
Post by: jan0s1k on January 23, 2013, 11:09:21 pm
The person who was hosting fonline.ru disappeared mysteriously a few months ago.
I guess that's where was the script. Anyway, thanks - it works now :)
Yeah, I know, but that's different page. Before that, there was a list of FOnline servers as I remember. Maybe Dagnir or cvet send him that script, nevermind :P
Title: Re: Server Status checker
Post by: Dagnir on June 05, 2013, 12:34:17 am
Yeah, I know, but that's different page. Before that, there was a list of FOnline servers as I remember. Maybe Dagnir or cvet send him that script, nevermind :P
The website is mine, you game me permission to use the script there yourself when I was asking for it in IRC.
It seems, that the one, who cvet gave that script has some problem with php. Here's same script on my server :P
http://sc.temote.pl/index.php
http://sc.temote.pl/generator.htm
I do have a problem with PHP (the problem is I don't know it at all), but the problem here was with the hosting - it was not allowing more than 8 PHP scripts running at the same time and dropping the website if PHP was used excessively. So first I had to restrict the checkers to fonline.ru and fonline-status.ru to keep the load down, and then to cut the number of checkers (TLA has static picture "Offline" for that reason). The other page you were speaking about was fonline.ru/servers.html, which was used by Cvet's FOnline Launcher, but we had to remove it for the same reason of overloading the checkers.
Is it ok if I switch back to using the script on your server? Well I already did that, actually - is it not loading it too much?
Title: Re: Server Status checker
Post by: jan0s1k on June 05, 2013, 04:14:59 pm
The website is mine, you game me permission to use the script there yourself when I was asking for it in IRC.I do have a problem with PHP (the problem is I don't know it at all), but the problem here was with the hosting - it was not allowing more than 8 PHP scripts running at the same time and dropping the website if PHP was used excessively. So first I had to restrict the checkers to fonline.ru and fonline-status.ru to keep the load down, and then to cut the number of checkers (TLA has static picture "Offline" for that reason). The other page you were speaking about was fonline.ru/servers.html, which was used by Cvet's FOnline Launcher, but we had to remove it for the same reason of overloading the checkers.
Is it ok if I switch back to using the script on your server? Well I already did that, actually - is it not loading it too much?
Hm, I thought, that fonline-status.narod.ru (or similiar) and fonline-status.ru belongs to someone else than you ;) Anyway yup, you already got permission a long time ago.
It's web hosting, then probably it's using Apache2 - this server is like.. swiss army knife, you can have it small and so useful just for you, but if you want to have one which is useful for everyone it weighs a lot and is quite slow to use. For me it (almost) doesn't creating any kind of load on server (ya, I love nginx and php5-fpm), so feel free to waste my traffic ;) If you want, you can point some kind of subdomain to ip of my server (if it would be better than current (http://sc.temote.pl))
Title: Re: Server Status checker
Post by: raynor009 on July 01, 2013, 12:28:19 pm
Does anyone still have the script? I can host server status banners on my website with no problem. I have can have unlimited trafic,space,domains,emails,subdomains etc...
Title: Re: Server Status checker
Post by: jan0s1k on July 01, 2013, 12:45:25 pm
It's still working  ::)
Title: Re: Server Status checker
Post by: raynor009 on July 01, 2013, 12:49:04 pm
Strange, it doesn't let me connect to your site only with proxy. Maybe its blocked by isp :/
Title: Re: Server Status checker
Post by: Wipe on July 01, 2013, 01:01:55 pm
You can check this one (https://github.com/wipe2238/fowww/blob/master/class/FOnlineServer.php), but it does not include graphic generation (yet).
Title: Re: Server Status checker
Post by: raynor009 on July 01, 2013, 02:56:21 pm
Quote
Parse error: syntax error, unexpected T_DNUMBER, expecting T_STRING or T_VARIABLE or '{' or '$' in /home2/dayzroma/public_html/FOnlineServer.php on line 45


Quote
$this->Test = $name;
$this->71.113.37.17 = $host;
$this->4000 = (int)$port;

Where did I go wrong?
Title: Re: Server Status checker
Post by: Wipe on July 01, 2013, 03:38:35 pm
Simplest way goes like this:

Code: (php) [Select]
include( 'FOnlineServer.php' );

$server = new FOnlineServer();
$server->Setup( "FOnline Server Name", "fonline.example.com", 4000 );
$server->Ping();

...php does its work...

Code: (php) [Select]
if( $server->Status == FOnlineServer::ONLINE )
{
   echo $server->Name . ' is online, players: ' . $server->Players . ', uptime: ' . $server->Uptime;
}
else
{
   echo $server->Name . ' is dead or dying';
}

You can easily assume that if $server->Players is less than 0, then server is offline; be also warned, that timeout for connecting and reading data is set to very minimal values (5s for both), so you may want to increase it. Here example with 15s for connection and 30s for receiving data.
Code: (php) [Select]
$server->Ping( 15, 30 );
Title: Re: Server Status checker
Post by: wladimiiir on July 01, 2013, 03:50:16 pm
I guess his problem is that host 71.113.37.17 is treated like a number not like a string in PHP. I am not very PHP familiar, but that seems to be what his error says.

Try using "71.113.37.17" instead of 71.113.37.17, if you are doing so.
Title: Re: Server Status checker
Post by: raynor009 on July 01, 2013, 03:58:54 pm
I will try again later and let you know how it went.
Title: Re: Server Status checker
Post by: Cpt.Rookie on July 01, 2013, 04:35:22 pm
The other option (without need of having own checking scripts) is to use links (column "link to status as text") at http://riget.info/index.php?page=fonlineProjects, i.e.

http://riget.info/check/tlamk2/?t
http://riget.info/check/requiem/?t
http://riget.info/check/fode/?t
http://riget.info/check/gh/?t