[PHP] Listing clients in a table]

ptR

Member
Nov 15, 2015
47
0
38
Name of the script: List clients in php
Functions of the script: listing online clients with groups
Why do you want it: I want to create a webadmin for me

Hello someone can create script that listing connected users in table and shows it in php/css/bootsrap table? I would like it to my admin page.
 
Last edited:

Mr_omar

Active Member
Jan 5, 2017
83
33
68
Hello someone can create script that listing connected users in table and shows it in php/css/bootsrap table? I would like it to my admin page.
Did you mean cliantlist ? Its pretty easy
I can't help you since you didn't use the script request:D
 

Najsr

Moderator
TeamSpeak Developer
Apr 23, 2016
483
249
167
PHP:
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Teamspeak example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7" crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  <script src="<min class="js"></min>"></script>
</head>
<body>

<div class="container">
  <h2>List of online clients on the server</h2>      
  <table class="table">
    <thead>
      <tr>
        <th>Nickname</th>
        <th>Unique ID</th>
        <th>Platform</th>
      </tr>
    </thead>
    <tbody>
    <?php
    require_once('libraries/TeamSpeak3/TeamSpeak3.php');
    $ts3_VirtualServer = TeamSpeak3::factory("serverquery://user:pw@localhost:10011/?server_port=9987");
    $ts3_VirtualServer->clientListReset();
    foreach($ts3_VirtualServer->clientList() as $client) {
    if($client['client_type']) continue;
    echo "<tr>
        <td>{$client['client_nickname']}</td>
        <td>{$client['client_unique_identifier']}</td>
        <td>{$client['cliet_platform']}</td>
      </tr>";
    }
    ?>
    </tbody>
  </table>
</div>

</body>
</html>
Didn't test it, but it should work.
 
Last edited:
Top