[kS] TeknoMW3 Server Status Box on Website

WatchMiltan

Honorable Member
Honorable Member
May 14, 2016
1,575
1,998
158
Hey,
i was a little bored and thought something like a server update box on our webite could be helpful...take a look:

Screenshot_68.png
Screenshot_67.png

For those of you, who are interested in the code:
CSS Inline (no external style sheet)

HTML Code for Online

HTML:
<div class="section staffOnline avatarList">
        <div class="secondaryContent">
            <h3><a href="index.php?members/&amp;type=staff">Server Status</a></h3>
            <ul>                       
                            <li>
                                <img src="https://cdn2.iconfinder.com/data/icons/function_icon_set/accepted_48.png" width="48" height="48" class="avatar Av24s">
                                <span class="username" style="color:lime; font-weight:bold;">ONLINE</span>
                                <div class="userTitle">Servers are up and running.</div>
                            </li>
            </ul>
        </div>
    </div>

HTML Code for Offline
HTML:
<div class="section staffOnline avatarList">
        <div class="secondaryContent">
            <h3><a href="index.php?members/&amp;type=staff">Server Status</a></h3>
            <ul>
                            <li>
                                <img src="https://cdn2.iconfinder.com/data/icons/function_icon_set/cancel_48.png" width="48" height="48" class="avatar Av24s">
                                <span class="username" style="color:#ff1a1a; font-weight:bold;">OFFLINE</span>
                                <div class="userTitle">We are experiencing some problems, please be patient.</div>
                            </li>
            </ul>
        </div>
    </div>

NOTE:
As you might notice, these div's have been created by using the staffOnline avatarList Class. To avoid any problems all classes and ID's have to be changed. (If embedded into the website)


PHP Code to get it working. Has not been adapted to code above, can do so if leaders decide to implement into website.
PHP:
<?php
  $server = "XX.XX.XX.XX";      - Server IP
  $port = "8080";                      - Server Port
  $timeout = "10";                    - updates every 10 seconds
  if ($server and $port and $timeout)
  {
  $teknoserver = @fsockopen("$server", $port, $timeout);
  }
  if($teknoserver)
  {
  echo "Server is up and running";
  }
  else
  {
  echo "We are experiencing some problems, please be patient.";
  }
  ?>

If we decide to implement it into the website, go ahead :) We don't have to though, was just a suggestion. Just let me know what you think :)
 

KillEmil

Member
Member
Kombat Syndicate
Donating Member
May 16, 2016
1,341
1,622
158
Greece
I like that idea WatchMiltan! I believe it will help forum too! I dont know if we could use it but i like it!
 
  • Like
Reactions: CoSMiN_-_PaGEA

Hary

Imagine,Believe,Achieve.
Honorable Member
May 15, 2016
5,369
8,041
108
27
yeah this has been brought up many times and is surely a good idea! hopefully, wildy will implement this :D
 

neRo!

Leader
Staff member
Leader
Kombat Syndicate
Recruitment Team
Ban & Unban Team
Donating Member
May 14, 2016
2,237
2,915
158
nice :)

Where did you get the source codes ? :D
 
  • Like
Reactions: Hary

neRo!

Leader
Staff member
Leader
Kombat Syndicate
Recruitment Team
Ban & Unban Team
Donating Member
May 14, 2016
2,237
2,915
158
Nice work then :)
Yeaa, some time ago I also searched for a PHP method to check whether a certain Port of an IP is reachable or not. That kind of method is pretty easy, but you need to know a bit about PHP for the commands and syntax :p
 
Last edited:

LeiTRoSaS

Help and Respect
Honorable Member
May 14, 2016
4,376
5,039
108
Portugal
Did them myself :p :D except PHP one, got lil help from my dear friend google^^

i dont understand a sh*t about it.... but it looks great :D :D :D :D
like hary said that idea was mentioned before in old forum . Most of us apreciated.

The servers status ok. But can u add the number of clients too?



is it just me, or this should be in admins section?
 

WatchMiltan

Honorable Member
Honorable Member
May 14, 2016
1,575
1,998
158
i dont understand a sh*t about it.... but it looks great :D :D :D :D
like hary said that idea was mentioned before in old forum . Most of us apreciated.

The servers status ok. But can u add the number of clients too?



is it just me, or this should be in admins section?
What do you mean with clients? Like how many people are connected to our servers?

And yeah go ahead if you want to move it to another section :)
 

WatchMiltan

Honorable Member
Honorable Member
May 14, 2016
1,575
1,998
158

Hary

Imagine,Believe,Achieve.
Honorable Member
May 15, 2016
5,369
8,041
108
27
I don't know yet, it just shows it is online right now, but hopefully it shows it is offline when it is offline


I didn't know yet what that buttons should be called :p
Make it as a refresh button or something of that use .