Hello!
I'm looking for viewer on my site with only Online status (on/off) and online number. Don't need full list of online members.
Have you ever seen something like that?
Thanks.
We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020
Hello!
I'm looking for viewer on my site with only Online status (on/off) and online number. Don't need full list of online members.
Have you ever seen something like that?
Thanks.
Hello,
Chek here: http://addons.teamspeak.com/director...web-based.html. I think you find that you wants.
I can only see typical viewers with channels etc. I'm looking for simple 2 lines: Online Status, and Online Users (number). Nothing more. Any guide how can I write that or any released project anywhere?
Requires TS3 PHP FrameworkCode:<?php /** * @name Display TS3 Status and Clientcount * @author SilentStorm */ date_default_timezone_set("Europe/London"); require_once("./libraries/TeamSpeak3/TeamSpeak3.php"); TeamSpeak3::init(); header('Content-Type: text/html; charset=utf8'); $status = "offline"; $count = 0; $max = 0; try { $ts3 = TeamSpeak3::factory("serverquery://<QUERY_USER>:<PASSWORD>@<SERVER_NAME_OR_IP>:<QUERY_PORT>/?server_port=<TS3_VOICE_PORT>&use_offline_as_virtual=1&no_query_clients=1"); $status = $ts3->getProperty("virtualserver_status"); $count = $ts3->getProperty("virtualserver_clientsonline") - $ts3->getProperty("virtualserver_queryclientsonline"); $max = $ts3->getProperty("virtualserver_maxclients"); } catch (Exception $e) { echo '<div style="background-color:red; color:white; display:block; font-weight:bold;">QueryError: ' . $e->getCode() . ' ' . $e->getMessage() . '</div>'; } echo '<span class="ts3status">TS3 Server Status: ' . $status . '</span><br/><span class="ts3_clientcount">Clients online: ' . $count . '/' . $max . '</span>'; ?>
Fill in the Blanks in above Code to fit your Scenario.
Everything you have to change is surrounded by <> and written in ALL CAPS! Make sure you replace all the ALL CAPS stuff including the < and > Signs surrounding them. Do NOT replace anything else.
Save it as ts3status.php somewhere on your Server and put the following anywhere where you want to display the information:
Code:<?php include('path/where/you/put/the/file/ts3status.php'); ?>
Just tried it out. Getting this error:. WHat do i do. The path directory is right and all serverquery is tooWarning: include(/public_html/status/ts3status.php) [function.include]: failed to open stream: No such file or directory in /home1/yourcp/public_html/status/index.php on line 2
Warning: include() [function.include]: Failed opening '/public_html/status/ts3status.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home1/yourcp/public_html/status/index.php on line 2
There are currently 1 users browsing this thread. (0 members and 1 guests)