Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function check($server,$port=8585,$timeout=3) {
- $PingIT = fsockopen($server, $port, $timeout);
- if ( ! $PingIT ) {
- return FALSE;
- } else {
- return TRUE; }}
- //IP:t till servrarna
- $server50 = '109.234.77.11';
- $status50 = check($server50);
- $server = '109.234.77.20';
- $status = check($server);
- $server2 = '109.234.77.21';
- $status2 = check($server2);
- $server3 = '109.234.77.21';
- $status3 = check($server3);
- $server4 = '109.234.77.22';
- $status4 = check($server4);
- $server5 = '109.234.77.22';
- $status5 = check($server5);
- $server6 = '109.234.77.23';
- $status6 = check($server6);
- $server7 = '109.234.77.23';
- $status7 = check($server7);
- $server8 = '109.234.77.24';
- $status8 = check($server8);
- $server9 = '109.234.77.24';
- $status9 = check($server9);
- $server10 = '109.234.77.25';
- $status10 = check($server10);
- $server11 = '109.234.77.25';
- $status11 = check($server11);
- $server12 = '109.234.77.26';
- $status12 = check($server12);
- $server13 = '109.234.77.26';
- $status13 = check($server13);
- $server14 = '109.234.77.26';
- $status14 = check($server14);
- //Kollar om login page är igång
- if( $status50 ) {
- $Result50 = "<font color='green'><b>online</b></font>";
- } else {
- $Result50 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten50 = "8484";
- $timeouten = "3";
- function ping50($server50, $porten50, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server50, $porten50, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 1 är igång
- if( $status ) {
- $Result1 = "<font color='green'><b>online</b></font>";
- } else {
- $Result1 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten = "8085";
- $timeouten = "3";
- function ping1($server, $porten, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server, $porten, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 2 är igång
- if( $status2 ) {
- $Result2 = "<font color='green'><b>online</b></font>";
- } else {
- $Result2 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten = "8085";
- $timeouten = "3";
- function ping2($server2, $porten, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server2, $porten, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 3 är igång
- if( $status3 ) {
- $Result3 = "<font color='green'><b>online</b></font>";
- } else {
- $Result3 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten2 = "8086";
- $timeouten = "3";
- function ping3($server3, $porten2, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server3, $porten2, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 4 är igång
- if( $status4 ) {
- $Result4 = "<font color='green'><b>online</b></font>";
- } else {
- $Result4 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten = "8085";
- $timeouten = "3";
- function ping4($server4, $porten, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server4, $porten, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 5 är igång
- if( $status5 ) {
- $Result5 = "<font color='green'><b>online</b></font>";
- } else {
- $Result5 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten2 = "8086";
- $timeouten = "3";
- function ping5($server5, $porten2, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server5, $porten2, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 6 är igång
- if( $status6 ) {
- $Result6 = "<font color='green'><b>online</b></font>";
- } else {
- $Result6 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten = "8085";
- $timeouten = "3";
- function ping6($server6, $porten, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server6, $porten, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 7 är igång
- if( $status7 ) {
- $Result7 = "<font color='green'><b>online</b></font>";
- } else {
- $Result7 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten2 = "8086";
- $timeouten = "3";
- function ping7($server7, $porten2, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server7, $porten2, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 8 är igång
- if( $status8 ) {
- $Result8 = "<font color='green'><b>online</b></font>";
- } else {
- $Result8 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten = "8085";
- $timeouten = "3";
- function ping8($server8, $porten, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server8, $porten, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 9 är igång
- if( $status9 ) {
- $Result9 = "<font color='green'><b>online</b></font>";
- } else {
- $Result9 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten2 = "8086";
- $timeouten = "3";
- function ping9($server9, $porten2, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server9, $porten2, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 10 är igång
- if( $status10 ) {
- $Result10 = "<font color='green'><b>online</b></font>";
- } else {
- $Result10 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten = "8085";
- $timeouten = "3";
- function ping10($server10, $porten, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server10, $porten, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 11 är igång
- if( $status11 ) {
- $Result11 = "<font color='green'><b>online</b></font>";
- } else {
- $Result11 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten2 = "8086";
- $timeouten = "3";
- function ping11($server11, $porten2, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server11, $porten2, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 12 är igång
- if( $status12 ) {
- $Result12 = "<font color='green'><b>online</b></font>";
- } else {
- $Result12 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten = "8085";
- $timeouten = "3";
- function ping12($server12, $porten, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server12, $porten, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 13 är igång
- if( $status13 ) {
- $Result13 = "<font color='green'><b>online</b></font>";
- } else {
- $Result13 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten2 = "8086";
- $timeouten = "3";
- function ping13($server13, $porten2, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server13, $porten2, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- //Kollar om servern 14 är igång
- if( $status14 ) {
- $Result14 = "<font color='green'><b>online</b></font>";
- } else {
- $Result14 = "<font color='red'><b>offline</b></font>";}
- //Kollar pingtiden
- $porten3 = "8087";
- $timeouten = "3";
- function ping14($server14, $porten3, $timeouten) {
- $tB = microtime(true);
- $fP = fSockOpen($server14, $porten3, $errno, $errstr, $timeouten);
- if (!$fP) { return "down"; }
- $tA = microtime(true);
- return round((($tA - $tB) * 1000), 0)."ms";
- }
- ?>
- <center><?php echo "Login page "; ?> is <?php echo $Result50; echo " with ping "; echo ping50("109.234.77.11", 8484, 10);?>.</center>
- <center><?php echo "Channel 1 "; ?> is <?php echo $Result1; echo " with ping "; echo ping1("109.234.77.20", 8585, 10);?>.</center>
- <center><?php echo "Channel 2 "; ?> is <?php echo $Result2; echo " with ping "; echo ping2("109.234.77.21", 8585, 10);?>.</center>
- <center><?php echo "Channel 3 "; ?> is <?php echo $Result3; echo " with ping "; echo ping3("109.234.77.21", 8586, 10);?>.</center>
- <center><?php echo "Channel 4 "; ?> is <?php echo $Result4; echo " with ping "; echo ping4("109.234.77.22", 8585, 10);?>.</center>
- <center><?php echo "Channel 5 "; ?> is <?php echo $Result5; echo " with ping "; echo ping5("109.234.77.22", 8586, 10);?>.</center>
- <center><?php echo "Channel 6 "; ?> is <?php echo $Result6; echo " with ping "; echo ping6("109.234.77.23", 8585, 10);?>.</center>
- <center><?php echo "Channel 7 "; ?> is <?php echo $Result7; echo " with ping "; echo ping7("109.234.77.23", 8586, 10);?>.</center>
- <center><?php echo "Channel 8 "; ?> is <?php echo $Result8; echo " with ping "; echo ping8("109.234.77.24", 8585, 10);?>.</center>
- <center><?php echo "Channel 9 "; ?> is <?php echo $Result9; echo " with ping "; echo ping9("109.234.77.24", 8586, 10);?>.</center>
- <center><?php echo "Channel 10 "; ?> is <?php echo $Result10; echo " with ping "; echo ping10("109.234.77.25", 8585, 10);?>.</center>
- <center><?php echo "Channel 11 "; ?> is <?php echo $Result11; echo " with ping "; echo ping11("109.234.77.25", 8586, 10);?>.</center>
- <center><?php echo "Channel 12 "; ?> is <?php echo $Result12; echo " with ping "; echo ping12("109.234.77.26", 8585, 10);?>.</center>
- <center><?php echo "Channel 13 "; ?> is <?php echo $Result13; echo " with ping "; echo ping13("109.234.77.26", 8586, 10);?>.</center>
- <center><?php echo "Channel 14 "; ?> is <?php echo $Result14; echo " with ping "; echo ping14("109.234.77.27", 8587, 10);?>.</center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement