Forum

Page 99 of 100 FirstFirst ... 4989979899100 LastLast
Results 1,471 to 1,485 of 1493
  1. #1471
    Join Date
    July 2017
    Posts
    5
    Is there a way to delete user avatar?

  2. #1472
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,335
    Delete "/avatar_" followed by the UID from channel 0.

  3. #1473
    Join Date
    July 2017
    Posts
    5
    Quote Originally Posted by numma_cway View Post
    Delete "/avatar_" followed by the UID from channel 0.
    So.. just delete avatar file from teamspeak/files/virtualserver/internal ? Is it save?
    Not working, probably only after server restart.. Is there another way?

  4. #1474
    Join Date
    April 2014
    Posts
    35
    i guess its not /avatar_<uid> more like /avatar_<base64uid>

  5. #1475
    Join Date
    August 2018
    Posts
    1

    PHP Framwork help.

    Hi, forum.

    I'm currently in the making of a local web app that allows me to change channel talk power for use in pro tournaments where you need to mute/unmute the coach.

    But I need help with some errors..

    Some info about my setup:
    Teamspeak server is located locally.
    My web instance is local on my work pc

    My php code:
    Code:
    <?php
    error_reporting(E_ALL);
    require_once("libraries/TeamSpeak3/TeamSpeak3.php");
    $properties = array();
    $ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=10011");
    $properties[0] = $ts3_VirtualServer->getId();
    echo '<script> alert ("' .$properties[0]. '")</script>'; 
    $ts3_VirtualServer->execute("i_client_talk_power", $properties);
    $ts3_VirtualServer->resetNodeInfo();
    ?>
    The error
    Code:
    Fatal error: Uncaught TeamSpeak3_Adapter_ServerQuery_Exception: invalid serverID in C:\xampp\htdocs\libraries\TeamSpeak3\Adapter\ServerQuery\Reply.php:316 Stack trace: #0 C:\xampp\htdocs\libraries\TeamSpeak3\Adapter\ServerQuery\Reply.php(88): TeamSpeak3_Adapter_ServerQuery_Reply->fetchError(Object(TeamSpeak3_Helper_String)) #1 C:\xampp\htdocs\libraries\TeamSpeak3\Adapter\ServerQuery.php(140): TeamSpeak3_Adapter_ServerQuery_Reply->__construct(Array, 'use port=10011', Object(TeamSpeak3_Node_Host), true) #2 C:\xampp\htdocs\libraries\TeamSpeak3\Node\Abstract.php(70): TeamSpeak3_Adapter_ServerQuery->request('use port=10011', true) #3 C:\xampp\htdocs\libraries\TeamSpeak3\Node\Abstract.php(94): TeamSpeak3_Node_Abstract->request('use port=10011') #4 C:\xampp\htdocs\libraries\TeamSpeak3\Node\Host.php(182): TeamSpeak3_Node_Abstract->execute('use', Array) #5 C:\xampp\htdocs\libraries\TeamSpeak3\Node\Host.php(268): TeamSpeak3_Node_Host->serverSelectByPort(10011) #6 C:\xampp\htdocs\libraries\TeamSpeak3\TeamSpeak3.php(386): TeamSpeak3_ in C:\xampp\htdocs\libraries\TeamSpeak3\Adapter\ServerQuery\Reply.php on line 316
    The goal is to have a btn change the talk power.

    Hope you can help!

  6. #1476
    Join Date
    September 2012
    Posts
    6,076
    I doubt you have a voice server running on port 10011.

    ?server_port= specified the voice server port, you'd like to use.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  7. #1477
    Join Date
    August 2018
    Posts
    2
    hi
    I wonder why is it not working?
    I'm trying to print all the icons id's from the server (all the icons that are in i_icon_id)
    PHP Code:
    <?php
    // load framework files
    require_once('ts3_lib/TeamSpeak3.php');
    // connect to local server, authenticate and spawn an object for the virtual server on port 9987
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=9987");

    //Print Icon List
    foreach($ts3_VirtualServer->getIcon() as $Ico) {
       echo 
    $Ico "<br />";
    }

    ?>

  8. #1478
    Join Date
    October 2016
    Location
    Berlin, Berlin, Germany
    Posts
    160

  9. #1479
    Join Date
    September 2018
    Posts
    2
    Hi, I've been looking for a way to create a channel as soon as someone joins a specific channel. What's the easiest way to do it? In long term, I want to poke clients in a specific server group, create a channel with the user's name who joined the channel and move him to this channel. In case anybody got the time to help me out, I'd highly appreciate it!

    Cheers

  10. #1480
    Join Date
    November 2018
    Posts
    1

    PHP import export permissions ?

    Hi, import server group permissions with php ts3 framework?

  11. #1481
    Join Date
    March 2011
    Location
    Russia
    Posts
    24
    Simple REST API planetteamspeak serverhistory down? (global list servers all offline)

  12. #1482
    Join Date
    December 2018
    Posts
    1

    Get Client description

    Hello! Im trying to get the client description with this code:

    PHP Code:
    $name $ts3_VirtualServer->clientGetById(47);
    echo 
    "<pre>";
    $desc $name->client_description;
    print_r ($desc); 
    I get this:

    HTML Code:
    TeamSpeak3_Helper_String Object
    (
        [string:protected] => 
        [position:protected] => 0
    )

  13. #1483
    Join Date
    November 2017
    Location
    Cologne, Germany
    Posts
    181
    Quote Originally Posted by MrRobotini View Post
    Hello! Im trying to get the client description with this code
    TeamSpeak3_Helper_String as the name suggests is a helper class for handling strings which comes with a ton of methods to manipulate the actual string in various ways.

    In order to get the plain string representation of the object, you can simply cast it to string.

    PHP Code:
    $name $ts3_VirtualServer->clientGetById(47);
    echo 
    "<pre>";
    $desc = (string)$name->client_description;
    print_r ($desc); 
    See the official documentation for more information.

  14. #1484
    Join Date
    December 2018
    Posts
    1

    Teamspeak PHP Framework Question Regarding User Logging in Event

    I am trying to create a script that will execute a block of code when a user enters the server. I have been researching all over the internet and have found that I needed to use this:
    PHP Code:
    TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyCliententerview""onClientEnterView"); 

    Although the event triggers properly when someone enters the server, it generates an error saying something along the lines of it not existing under TeamSpeak3_Helper_Signal. If I was told to use this for my onuserjoin events, why is this generating an error? was there a newer version of the framework that removed this specific event from the framework? Please help.

  15. #1485
    Join Date
    October 2017
    Location
    Brasil, Rio de Janeiro
    Posts
    11
    Hello, how do I determine where the channel has to be created. wanted to be raised in a particular prayer. Not underneath all other channels nor as sub channel of any channel (root). this current code it creates channels that always remain like the last rooms of the server.

    PHP Code:
    <?PHP
    require_once('libs/TeamSpeak3/TeamSpeak3.php');
    require_once(
    'config.php');
    require_once(
    'libs/recaptcha/src/autoload.php');
    require_once(
    'libs/chadd.php');
    date_default_timezone_set('America/Sao_Paulo');
    $type = @$_GET["type"];
         
    date_default_timezone_set('America/Sao_Paulo');

    function 
    Response($code$header$msg) {
        
    $resp = array(
            
    "code" => $code,
            
    "header" => $header,
            
    "msg" => $msg,
        );
        
    $data json_encode($resp);
        echo 
    $data;
        exit;
    }

    switch(
    $type) {

    case 
    0:

    $request json_decode(file_get_contents("php://input"));
    $numeros mt_rand(109999);
    $recaptcha = new \ReCaptcha\ReCaptcha($secret);
    $resp $recaptcha->verify($request->captcha_resp$_SERVER['REMOTE_ADDR']);

    if(
    $resp->isSuccess()) {

         if(
    $chadd->CheckCookie()) 
         {
             
    Response(406"Erro :(""Você não pode criar um canal novamente.");
         }

         
    //REPLACE bad words
        
    $request->channelname $chadd->ReplaceBadString($badwords$request->channelname);

        if(
    $chadd->CheckStringIP($request->channelname))
        {
            
    Response(403"Erro :(""No nome do seu canal não há endereço ou domínio IP permitido.");
        }

        if(
    $chadd->CheckStringDomain($request->channelname))
        {
            
    Response(403"Erro :(""No nome do seu canal não há endereço ou domínio IP permitido.");
        }

        if(
    $request->quality || $request->quality 10)
        {
            
    $request->quality 7;
        }

        switch (
    $request->codec)
        {
                            case 
    1
                            
    define("TS3_CODEC"TeamSpeak3::CODEC_OPUS_VOICE);
                            break; 

                            case 
    2:
                            
    define("TS3_CODEC"TeamSpeak3::CODEC_CELT_MONO);
                            break; 

                            case 
    3
                            
    define("TS3_CODEC"TeamSpeak3::CODEC_SPEEX_ULTRAWIDEBAND);
                            break; 

                            default:
                            
    define("TS3_CODEC"TeamSpeak3::CODEC_OPUS_VOICE);
        }

        try {

                
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://$ts3_username:$ts3_password@$ts3_host:$ts3_q_port/?server_port=$ts3_s_port");
                
    $ts3_VirtualServer->selfUpdate(array('client_nickname'=> $ts3_nick));
                

                
    $client $ts3_VirtualServer->clientGetByUid($request->uuid);
                
    $groups $client["client_servergroups"];
                
    $groups explode(','$groups);
                
    $group_matches 0;

                foreach(
    $allowed_groups as $g)
                {
                        
    $client_nickname $client->client_nickname;
                        
    $channelname $request->channelname;
                        
    $unixTime time();
                        
    $realTime date('[d-m-Y]-[H:i]',$unixTime);
                    if(
    in_array($g$groups))
                    {
                        
    $group_matches++;
                    }
                }

                if(
    $group_matches <= 0)
                {
                    
    Response(403"Não Autorizado "," Não é permitido usar esta ferramenta, você não está em um grupo permitido.");
                }

                
    $cid $ts3_VirtualServer->channelCreate(array(
                
    "channel_name" => "[cspacer" $numeros "] ━━━━━━━━━━◥◣◆◢◤━━━━━━━━━    ",
                
    "channel_password" => $request->password,
                
    "channel_maxclients" => 0,
                
    "channel_flag_maxclients_unlimited" => false,
                
    "channel_topic" => $channel_topic,
                
    "channel_codec" => TS3_CODEC,
                
    "channel_create_with_sortorder" => 632,
                
    "cid"                  => 632,
                
    "channel_codec_quality" => $request->quality,
                
    "channel_flag_permanent" => TRUE,
                
    "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Data e hora que foi criado: '.$realTime.'[*]Criador: ' $client_nickname '[/list][/b] [COLOR=#ff0000][B][u]ATENÇÃO:[/u][/B]
    Participando do TS você concorda com as [url=http://esbsb.com.br/rules.php]regras[/url] aqui contidas, cuja leitura é de responsabilidade do usuário. Dizer que não conhece as regras não é desculpa para justificar atos que as descumpram. As punições para a violação de regras citadas abaixo variam de temporárias a permanente, portanto pense duas vezes antes de descumpri-las.[/COLOR]'
    ,
                
    "channel_flag_semi_permanent" => FALSE
                
    ));

                
    $Onecid $ts3_VirtualServer->channelCreate(array(
                
    "channel_name" => $request->channelname//nome do canal aqui
                
    "channel_password" => $request->password//você pode deixar ele sem senha ou deixar a mesma senha de família do canal
                
    "channel_topic" => $channel_topic,
                
    "channel_codec" => TS3_CODEC,
                
    "channel_maxclients" => 0,
                
    #"channel_icon_id" => "3534515520",
                
    "channel_flag_maxclients_unlimited" => FALSE,
                
    "channel_codec_quality" => $request->quality,
                
    "channel_flag_permanent" => TRUE//Não permanente
                
    "channel_description" => $channel_description,
                
    "channel_flag_semi_permanent" => FALSE //Canal semi-permanente para alterar permanente = ''channel_flag_permanent''
                
    ));
                
                
    $Twocid $ts3_VirtualServer->channelCreate(array(
                
    "channel_name" => "● Bem Vindo"//nome do canal aqui
                
    "channel_password" => $request->password//você pode deixar ele sem senha ou deixar a mesma senha de família do canal
                
    "channel_topic" => $channel_topic,
                
    "channel_codec" => TS3_CODEC,
                
    "channel_codec_quality" => $request->quality,
                
    "channel_flag_permanent" => TRUE//Não permanente
                
    "cpid"                  => $Onecid//ID do Canal criado '' root channel cpid ''
                
    "channel_description" => $channel_description,
                
    "channel_flag_semi_permanent" => FALSE //Canal semi-permanente para alterar permanente = ''channel_flag_permanent''
                
    ));
                
                
    $Treecid $ts3_VirtualServer->channelCreate(array(
                
    "channel_name" => "● Jogando"//nome do canal aqui
                
    "channel_password" => $request->password// você pode deixar ele sem senha ou deixar amesma senha de família do canal
                
    "channel_topic" => $channel_topic,
                
    "channel_codec" => TS3_CODEC,
                
    "channel_codec_quality" => $request->quality,
                
    "channel_flag_permanent" => TRUE//Não permanente
                
    "cpid"                  => $Onecid//ID do Canal criado '' root channel cpid ''
                
    "channel_description" => $channel_description,
                
    "channel_flag_semi_permanent" => FALSE //Canal semi-permanente para alterar permanente = ''channel_flag_permanent''
                
    ));
                
                
    $Forcid $ts3_VirtualServer->channelCreate(array(
                
    "channel_name" => "● Bate Papo"//nome do canal aqui
                
    "channel_password" => $request->password// você pode deixar ele sem senha ou deixar amesma senha de família do canal
                
    "channel_topic" => $channel_topic,
                
    "channel_codec" => TS3_CODEC,
                
    "channel_codec_quality" => $request->quality,
                
    "channel_flag_permanent" => TRUE//Não permanente
                
    "cpid"                  => $Onecid//ID do Canal criado '' root channel cpid ''
                
    "channel_description" => $channel_description,
                
    "channel_flag_semi_permanent" => FALSE //Canal semi-permanente para alterar permanente = ''channel_flag_permanent''
                
    ));


                
    //log cid with IP (abuse)
                
    $usr_ip $_SERVER['REMOTE_ADDR'];
                
    $ts3_VirtualServer->logAdd("Channel $cid created from IP:$usr_ip"TeamSpeak3::LOGLEVEL_INFO);

            
                
    $token $ts3_VirtualServer->privilegeKeyCreate(0x01"$chadmin_group_id"  ,"$cid""TOKEN criado pelo web-criador.");
                
    $client->move($Twocid);
                
    $client->setChannelGroup($Twocid$chadmin_group_id);

                
    $chadd->SetCookie();


                
    $resp = array(
                        
    "code" => 1,
                        
    "header" => "Tudo certo! :)",
                        
    "token" => (string)$token,
                        
                        
    "url" => "$server_conn_url?port=$ts3_s_port&cid=$cid&channelpassword=$request->password",
                );


                
    $json json_encode($resp);
                echo 
    $json;
                exit;

                }

                catch (
    TeamSpeak3_Exception $e) {
                        
    Response(500"TS3-Erro: "$e->getCode(), $e->getMessage());
                }


    } else {
         
    $errors $resp->getErrorCodes();
         if(
    count($errors) >= 1)
         {
             
    Response(403"Erro :("$errors[0]);
         }
    }

    break;

    case 
    1:

    try {
             
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://$ts3_username:$ts3_password@$ts3_host:$ts3_q_port/?server_port=$ts3_s_port");
             
    $ts3_VirtualServer->selfUpdate(array('client_nickname'=> $ts3_nick));
             
    $clients $ts3_VirtualServer->clientList(array('connection_client_ip' => $_SERVER["REMOTE_ADDR"]));

             
    $matches count($clients);
             if(
    $matches || $matches <= 0)
             {
                 
    Response(404"Cliente não encontrado. "," Não foi possível determinar o seu ID exclusivo. Insira o seu ID exclusivo.");
             }

             if(
    $matches == 1)
             {
                 foreach(
    $clients as $c)
                 {

                 if(
    count($c->getClones()) > 1)
                 {
                     
    Response(404"Cliente não encontrado. "," Não foi possível determinar o seu ID exclusivo. Insira o seu ID exclusivo.");
                 }

                 
    $resp = array(
                     
    "code" => 200,
                     
    "header" => "Autenticado!",
                     
    "uuid" => (string)$c["client_unique_identifier"],
                     
    "name" => (string)$c["client_nickname"],
                 );

                 
    $json json_encode($resp);
                 echo 
    $json;
                 exit;

                }
            }
         
    }
    catch (
    TeamSpeak3_Exception $e) {
              
    Response(500"TS3-Erro: "$e->getCode(), $e->getMessage());
    }

    break;

    }
    ?>
    config.php

    PHP Code:
    <?PHP
    $public 
    "6LfhMTMUAAAAABLFuChEGBEQpnlKnl4UrZixEfPs"//Recaptcha Public Key
    $secret "6LfhMTMUAAAAADG4H1qUjgM759elMTBtX_yMVW4l"// Recaptcha Privat Key

    $ts3_host "192.241.250.170";
    $ts3_q_port "10011";
    $ts3_s_port "1";
    $ts3_username "serveradmin";
    $ts3_password "***";
    $ts3_nick "Criador de Canais";

    $cpid 800//SPACER ID (the root) the created channels will be collected as sub channel there
    $chadmin_group_id 22// Channel Admin Group ID Default 5

    $channel_description "";
    $channel_topic "Espero que goste do servidor. Agradecemos a preferência!";
    $server_conn_url "ts3server://ts.esbsb.com.br:9987";
    $imprint_url "https://esbsb.com.br";

    //BADWORDS will be replaced with XXXX
    $badwords = array("example""example");

    // Allowed groups whitelist
    $allowed_groups = array(181);
    ?>

Thread Information

Users Browsing this Thread

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

  1. Septron

Similar Threads

  1. PHP Framework
    By Multivit4min in forum Permission System
    Replies: 1
    Last Post: June 29th, 2015, 11:28 AM
  2. PHP Framework
    By phil998 in forum Server Support
    Replies: 0
    Last Post: February 25th, 2015, 06:27 PM
  3. TS3 PHP Framework Visualizations
    By Ronin Design in forum Tools / Web Based
    Replies: 2
    Last Post: February 22nd, 2015, 05:04 AM
  4. Extraction using the Framework
    By HarryMW in forum Tools / Web Based
    Replies: 1
    Last Post: August 3rd, 2012, 07:04 PM
  5. Teamspeak, PHP Framework?
    By mario2027 in forum General Questions
    Replies: 1
    Last Post: December 21st, 2010, 09:30 AM

Tags for this Thread

Posting Permissions

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