Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Prasau padekite del CS serverio zaideju info

Parašė Jomaajjaja· 2012 Bir. 17 12:06:08
#3

nu tai va tada sita, paprasta radau, reikia kad rodytu ir zaidejus prisijungusius


<?php
 
$pav ='#Cs.Aina.LT Public Serveris';
$ip ='77.241.199.216:27016';
 
$packet = "\xFF\xFF\xFF\xFFTSource Engine Query\x00";
 function getnextstring(&$data)
    {
       $temp="";
       $counter=0;
       while (ord($data[$counter++])!=0) $temp.=$data[$counter-1];
       $data=substr($data,strlen($temp)+1);
       return $temp;
   }
   function getnextbytevalue(&$data)
   {
     $temp=ord($data[0]);
     $data=substr($data,1);
     return $temp;
   }
 
        if(!$live_server = fsockopen("udp://77.241.199.216:27016"))
       {
        $output = "on";
      }
       else
       {
        fwrite($live_server, $packet);
        socket_set_timeout($live_server,1,0);
        $junk = fread($live_server,5);
        $status = socket_get_status($live_server);
        $do = 1;
        $server_info= "";
 
         while($do)
         {
           $str_1 = fread($live_server,1);
           $server_info .= $str_1;
           $status = socket_get_status($live_server);
           if($status["unread_bytes"] == 0) {$do = 0;}
         }
        fclose($live_server);
 
        if (strlen($server_info) > 0)
        {
          $success = 1;
         $junk = getnextstring($server_info);
         $servername = getnextstring($server_info);
         $map = getnextstring($server_info);
         $junk = getnextstring($server_info);
         $junk = getnextstring($server_info);
         $players = getnextbytevalue($server_info);
         $maxplayers = getnextbytevalue($server_info);
         }
         if ($players != "")
         {
          $players = $players;
         }
         else
         {
          $players = "0";
         }
         if ($maxplayers != "")
         {
          $maxplayers = $maxplayers;
         }
         else
         {
          $maxplayers = "0";
         }
         if ($players < $maxplayers)
         {
          $output = "<font color='green'>ON</font>";
         }
 
        else
        {
          $output = "Full";
        }
        if ($output != "Full" and $players != "0" or $maxplayers != "0")
        {
          $output = $output;
        }
        else
        {
          $output = "<font color='red'>OFF</font>";
        }
        if ($map != "")
         {
          $map = "$map";
         }
         else
         {
          $map = "nera";
         }
         echo "
 
<table class='mon' cellspacing='0' cellpadding='0' border='0'><tr>
<td rowspan='3' class='monitor_03' align='center'><img src='".THEME."images/maps/$map.png'/></td>
<td colspan='2' class='monitor_04' align='center'>$pav</td>
</tr><tr>
<td class='monitor_06' valign='top'>
ŽEMĖLAPIS: $map <br />
ADRESAS: $ip <br />
MODIFIKACIJA: surf <br />
ŽAIDĖJAI: $players / $maxplayers <br />
SERVERIO STATUSAS: $output <br />
</td>
<td class='monitor_07' align='center' valign='top'>
<img src='".THEME."images/left.png'/> PASLAUGOS <img src='".THEME."images/right.png'/>
<br />
VIP MENESIUI TIK <font color='#faa612'>1</font> LT <br />
ADMIN MENESIUI TIK <font color='#faa612'>2</font> LT <br />
SADMIN MENESIUI TIK <font color='#faa612'>3</font> LT <br />
UNBAN <font color='#faa612'>0.5</font> LT <br />
</td>
</tr><tr>
<td colspan='2' class='monitor_08'></td>
</tr></table>
";
      }
      ?> 

Redagavo Jomaajjaja· 2012 Bir. 17 12:06:45