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 4 of 4
  1. #1
    Join Date
    October 2013
    Posts
    6

    PHP Teamspeak 3 Framework #CHANNEL OF CLIENT

    Heya,

    Im freaky pissed of cauz i cant get the channel name of a client on my server ..

    so my question is:
    How to read the channel name/id from where the client is actually in?!?!


    Hope you guys can help me, please!!
    Last edited by hadshoo12; December 19th, 2013 at 05:07 AM.

  2. #2
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Warning: untested

    PHP Code:
    <?php

    $ts3_VirtualServer 
    TeamSpeak3::factory("serverquery://username:[email protected]:10011/?server_port=9987");

    // General example in a loop

    foreach($ts3_VirtualServer->clientList() as $client) {
        echo 
    'Client is in channel ' $ts3_VirtualServer->channelGetById($client['cid']);
    }

    // General example for an individual client
    // The IDs/name could be hardcoded or just obtained trough another piece of code

    // .. with name = barricas
    $clientName 'barricas';
    $client $ts3_VirtualServer->clientGetByName($clientName);

    // .. with ID = 10
    $clientID 10;
    $client $ts3_VirtualServer->clientGetById($clientID);

    // .. with DBID = 1234
    $clientDBID 1234;
    $client $ts3_VirtualServer->clientGetByDbid($clientDBID);

    // .. with UID = mCK/iJBaTpqUWkN3ZmSp32yDmLE=
    $clientUID 'mCK/iJBaTpqUWkN3ZmSp32yDmLE=';
    $client $ts3_VirtualServer->clientGetByUid($clientUID);

    echo 
    'Client is in channel ' $ts3_VirtualServer->channelGetById($client['cid']);
    This should be merged in the proper thread.

  3. #3
    Join Date
    October 2013
    Posts
    6
    Finally, it works!!

    THANKS YAAH, THANKKS <3

  4. #4
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    No problem.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Teamspeak 3 PHP Framework - Channel ID from Client
    By hadshoo12 in forum Server Support
    Replies: 0
    Last Post: October 20th, 2013, 11:20 PM
  2. Teamspeak 3 PHP Framework - ServerQuery Name
    By hadshoo12 in forum Server Support
    Replies: 4
    Last Post: October 19th, 2013, 03:39 PM
  3. Teamspeak 3 PHP Framework - Question
    By cddude in forum General Questions
    Replies: 2
    Last Post: September 24th, 2013, 03:39 AM
  4. TeamSpeak 3 PHP Framework
    By danger89 in forum General Questions
    Replies: 3
    Last Post: June 11th, 2012, 04:40 PM
  5. Teamspeak, PHP Framework?
    By mario2027 in forum General Questions
    Replies: 1
    Last Post: December 21st, 2010, 09:30 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
  •