fix status

This commit is contained in:
Karl Hudgell 2015-07-03 09:22:01 +01:00
parent fc7a1a5572
commit ef98336fb7
3 changed files with 40 additions and 28 deletions

View File

@ -1,15 +1,15 @@
<?php <?php
$yourname = "Karl"; // Set this to your name $yourname = ""; // Set this to your name
$base = "home.k-world.me.uk"; //Set this to your url (without HTTP) $base = ""; //Set this to your url (without HTTP)
$user = "home"; // Username for logging on $user = ""; // Username for logging on
$pass = "server"; // Password for logging on $pass = ""; // Password for logging on
$sabport = "8080"; // Set the ports for your services $sabport = "9090"; // Set the ports for your services
$sickport = "8081"; $sickport = "8081";
$cpadults = "8082"; $cpadults = "5050";
$cpkids = "5050"; $cpkids = "5051";
$utorrentport = "86"; $utorrentport = "86";
$ftpport = "21"; $ftpport = "21";
$madsonicport = "8087"; $madsonicport = "8087";
@ -24,11 +24,22 @@ $drive5 = "g:";
$drive6 = "h:"; $drive6 = "h:";
$drive7 = "j:"; $drive7 = "j:";
$server1name = "";
$server1url = "home.k-world.me.uk";
$server2name = "Duly Server";
$server2url = "duly.ml";
$server3name = "";
$server3url = "gowing.ga";
$server4name = "";
$server4url = "smiffster.tk";
// do not edit past here // do not edit past here
$local = "1"; $local = "1";
$ftp = "ftp://$base"; $ftp = "ftp://$base";
$http = "http://www";
$myurl = "http://$base"; $myurl = "http://$base";
$webclip = "http://webclip.ml"; $webclip = "http://webclip.ml";
$kknowledge = "http://kknowledge.tk"; $kknowledge = "http://kknowledge.tk";

View File

@ -14,8 +14,8 @@ require "ss_configs_servers.php";
# Start a variable to contain Service Status. # Start a variable to contain Service Status.
$serverStatus = "<table border='0' cellspacing='0' cellpadding='1'><tr BGCOLOR='#0066FF'><th style='text-align: left;'><font color='white'>Server</font></th><th style='text-align: left;'><font color='white'>Status</font></th></tr>"; $serverStatus = "<table border='0' cellspacing='0' cellpadding='1'><tr BGCOLOR='#0066FF'><th style='text-align: left;'><font color='white'>Server</font></th><th style='text-align: left;'><font color='white'>Status</font></th></tr>";
# Process all services montiored. # Process all services1 montiored.
foreach( $configs['services'] as $serviceName => $servicePort ) foreach( $configs['services1'] as $serviceName => $servicePort )
{ {
# Determine Port Status. # Determine Port Status.
$status = @fsockopen($configs['server_ip'], $servicePort, $errno, $errstr, 5); $status = @fsockopen($configs['server_ip'], $servicePort, $errno, $errstr, 5);
@ -34,8 +34,8 @@ foreach( $configs['services'] as $serviceName => $servicePort )
$serverStatus .= "<td BGCOLOR='#FFFFFF'>{$serviceName}</td><td BGCOLOR='#FFFFFF'>{$statusText}</td></tr>"; $serverStatus .= "<td BGCOLOR='#FFFFFF'>{$serviceName}</td><td BGCOLOR='#FFFFFF'>{$statusText}</td></tr>";
} }
# Process all services montiored. # Process all services1 montiored.
foreach( $configs['servicesKloud'] as $serviceName => $servicePort ) foreach( $configs['services2'] as $serviceName => $servicePort )
{ {
# Determine Port Status. # Determine Port Status.
$status = @fsockopen($configs['server_ip2'], $servicePort, $errno, $errstr, 5); $status = @fsockopen($configs['server_ip2'], $servicePort, $errno, $errstr, 5);
@ -54,8 +54,8 @@ foreach( $configs['servicesKloud'] as $serviceName => $servicePort )
$serverStatus .= "<td BGCOLOR='#FFFFFF'>{$serviceName}</td><td BGCOLOR='#FFFFFF'>{$statusText}</td></tr>"; $serverStatus .= "<td BGCOLOR='#FFFFFF'>{$serviceName}</td><td BGCOLOR='#FFFFFF'>{$statusText}</td></tr>";
} }
# Process all services montiored. # Process all services1 montiored.
foreach( $configs['servicesSpot'] as $serviceName => $servicePort ) foreach( $configs['services3'] as $serviceName => $servicePort )
{ {
# Determine Port Status. # Determine Port Status.
$status = @fsockopen($configs['server_ip3'], $servicePort, $errno, $errstr, 5); $status = @fsockopen($configs['server_ip3'], $servicePort, $errno, $errstr, 5);
@ -74,8 +74,8 @@ foreach( $configs['servicesSpot'] as $serviceName => $servicePort )
$serverStatus .= "<td BGCOLOR='#FFFFFF'>{$serviceName}</td><td BGCOLOR='#FFFFFF'>{$statusText}</td></tr>"; $serverStatus .= "<td BGCOLOR='#FFFFFF'>{$serviceName}</td><td BGCOLOR='#FFFFFF'>{$statusText}</td></tr>";
} }
# Process all services montiored. # Process all services1 montiored.
foreach( $configs['servicesKris'] as $serviceName => $servicePort ) foreach( $configs['services4'] as $serviceName => $servicePort )
{ {
# Determine Port Status. # Determine Port Status.
$status = @fsockopen($configs['server_ip4'], $servicePort, $errno, $errstr, 5); $status = @fsockopen($configs['server_ip4'], $servicePort, $errno, $errstr, 5);

View File

@ -1,4 +1,5 @@
<?php <?php
include 'config.php';
/* /*
* Script: Server Status * Script: Server Status
* Author: Martin Dixon * Author: Martin Dixon
@ -11,10 +12,10 @@
DO NOT EDIT THESE CONFIG LINES. DO NOT EDIT THESE CONFIG LINES.
*/ */
$configs = array(); $configs = array();
$configs['services'] = array(); $configs['services1'] = array();
$configs['servicesKloud'] = array(); $configs['services2'] = array();
$configs['servicesSpot'] = array(); $configs['services3'] = array();
$configs['servicesKris'] = array(); $configs['services4'] = array();
/******** /********
DO NOT EDIT THESE CONFIG LINES. DO NOT EDIT THESE CONFIG LINES.
@ -23,18 +24,18 @@ DO NOT EDIT THESE CONFIG LINES.
# You may edit these configs. # You may edit these configs.
$configs['server_ip'] = "home.k-world.me.uk"; // The Servers URL or IP to check. $configs['server_ip'] = $server1url; // The Servers URL or IP to check.
$configs['server_ip2'] = "duly.ml"; // The Servers URL or IP to check. $configs['server_ip2'] = $server2url; // The Servers URL or IP to check.
$configs['server_ip3'] = "gowing.ga"; // The Servers URL or IP to check. $configs['server_ip3'] = $server3url; // The Servers URL or IP to check.
$configs['server_ip4'] = "smifftser.youdontcare.com"; // The Servers URL or IP to check. $configs['server_ip4'] = $server4url; // The Servers URL or IP to check.
# For services simply add new lines with the Name and port number. # For services1 simply add new lines with the Name and port number.
$configs['servicesKloud']['<a href="http://www.duly.ml" target="_blank">Duly Server</a>'] = 80; $configs['services2']['<a href="$http:$server1url" target="_blank">$server2name</a>'] = 80;
#$configs['servicesSpot']['<a href="http://www.gowing.ga" target="_blank">Darren Server</a>'] = 80; $configs['services3']['<a href="http://www.gowing.ga" target="_blank">Darren Server</a>'] = 80;
$configs['services']['<a href="http://home.k-world.me.uk" target="_blank">Karl Server</a>'] = 80; $configs['services1']['<a href="http://home.k-world.me.uk" target="_blank">Karl Server</a>'] = 80;
$configs['servicesKris']['<a href="http://smiffster.tk" target="_blank">Kris Server</a>'] = 80; $configs['services4']['<a href="http://smiffster.tk" target="_blank">Kris Server</a>'] = 80;