Forum


Notice to all users

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

Results 1 to 2 of 2
  1. #1
    Join Date
    December 2009
    Location
    Germany
    Posts
    10

    [PHP] Simple TS On/Off Status

    For all of you who need a little simple ON/OFF status for their webpage.

    All you need is the TS3Admin PHP Library (http://forum.teamspeak.com/showthread.php?t=46905) and the following PHP code:

    Code:
    <?php
    require('ts3admin.class.php');
    
    $host = '127.0.0.1';		// Configure your IP or FQDN
    $query_port = 10011;		// Configure your Query Port
    $serverID = 1;
    
    $tsAdmin = new ts3admin($host, $query_port);
    $tsAdmin->connect();
    
    $tsAdmin->selectServer($serverID);
    $serverInfo = $tsAdmin->serverInfo();
    if ($serverInfo[virtualserver_status] != "online"){
      $status = "<font color=red>OFFLINE</font>";
    }else{
      $status = "<font color=green>ONLINE</font>";
    }
    echo "server is ". $status;
    
    $tsAdmin->logout();
    $tsAdmin->quit();
    ?>
    As you can see it is based on the Admin Library from the link above.
    With that powerfull Library you are able to get much more information out of your server. If you want to know how to do that you should take a look at the thread mentioned above or read the Ts3Admin documentation.

    Have fun

    Sammy
    Last edited by Sammy83; December 30th, 2009 at 10:57 AM.

  2. #2
    Join Date
    December 2009
    Location
    Hungary
    Posts
    6
    Quote Originally Posted by Sammy83 View Post
    For all of you who need a little simple ON/OFF status for their webpage.

    All you need is the TS3Admin PHP Library (http://forum.teamspeak.com/showthread.php?t=46905) and the following PHP code:

    Code:
    <?php
    require('ts3admin.class.php');
    
    $host = '127.0.0.1';		// Configure your IP or FQDN
    $query_port = 10011;		// Configure your Query Port
    $serverID = 1;
    
    $tsAdmin = new ts3admin($host, $query_port);
    $tsAdmin->connect();
    
    $tsAdmin->selectServer($serverID);
    $serverInfo = $tsAdmin->serverInfo();
    if ($serverInfo[virtualserver_status] != "online"){
      $status = "<font color=red>OFFLINE</font>";
    }else{
      $status = "<font color=green>ONLINE</font>";
    }
    echo "server is ". $status;
    ?>
    As you can see it is based on the Admin Library from the link above.
    With that powerfull Library you are able to get much more information out of your server. If you want to know how to do that you should take a look at the thread mentioned above or read the Ts3Admin documentation.

    Have fun

    Sammy
    Without Server admin status like this to Eve Online killboards ??

    http://eve-id.net/forum/viewtopic.ph...664&hilit=vent

    http://web.t-online.hu/jakuza1/listopen.png

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. simple web status
    By adrian17_17 in forum General Questions
    Replies: 0
    Last Post: February 2nd, 2014, 11:17 AM
  2. [Searching] simple on/off Status
    By Siggi in forum Tools / Web Based
    Replies: 2
    Last Post: December 24th, 2009, 01:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •