SHARE
TWEET

Untitled

a guest Nov 19th, 2019 111 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // KOD STRONY //
  2.  
  3.         <div class="col-7 col-md-8">
  4.             <div class="numbers">
  5.                <p class="card-title"><?php echo $server_ping; ?>
  6.                <p>
  7.                <p class="card-category">Ping</p>
  8.             </div>
  9.         </div>
  10.  
  11. // KOD PHP //
  12.  
  13. <?php
  14.  
  15. // BIBLIOTEKA
  16. require_once("libraries/TeamSpeak3/TeamSpeak3.php"); // path to teamspeak framework
  17.  
  18. // LOGOWANIE
  19.     $ts3_login="";        // LOGIN
  20.     $ts3_password="";   // HASŁO
  21.     $ts3_host="";   // Server IP adress
  22.     $ts3_queryport="10011";     // QUERY PORT (10011)
  23.     $ts3_voiceport="9987";      // VOICE PORT (9987)
  24.  
  25.  
  26. try{
  27.   // POŁĄCZENIE
  28.   $ts3_connect = TeamSpeak3::factory("serverquery://$ts3_login:$ts3_password@$ts3_host:$ts3_queryport/?server_port=$ts3_voiceport");
  29.   $ts3_connect->clientGetByName("ʜᴇʟʟᴛᴀʟᴋ » wᴇʙ ᴘᴀɢᴇ")->move(95); // cid: channel id
  30.   // ZMIENNE
  31.     $server_status = $ts3_connect->virtualserver_status;
  32.     $server_name = $ts3_connect->virtualserver_name;
  33.     $server_adress = $ts3_connect->getAdapterHost();
  34.     $server_uptame = TeamSpeak3_Helper_Convert::seconds($ts3_connect->virtualserver_uptime /86400) % 30;
  35.     $server_actuallyusers = $ts3_connect->virtualserver_clientsonline - $ts3_connect->virtualserver_queryclientsonline;
  36.     $server_maxusers= $ts3_connect->virtualserver_maxclients;
  37.     $server_channels = $ts3_connect->virtualserver_channelsonline;
  38.     $server_download = TeamSpeak3_Helper_Convert::bytes($ts3_connect->connection_filetransfer_bytes_received_total + $ts3_connect->connection_bytes_received_total);
  39.     $server_upload = TeamSpeak3_Helper_Convert::bytes($ts3_connect->connection_filetransfer_bytes_sent_total + $ts3_connect->connection_bytes_sent_total);
  40.     $server_packetloss = $ts3_connect->virtualserver_total_packetloss_total;
  41.     $server_ping = $ts3_connect->virtualserver_total_ping;
  42.     }
  43.  
  44. // ERROR
  45.  
  46.     catch(Exception $e){
  47.     echo "<p class='server_error'> ERROR: </p>" , $e->getMessage(), "\n";
  48.     }
  49. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top