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

Page 81 of 100 FirstFirst ... 3171798081828391 ... LastLast
Results 1,201 to 1,215 of 1498
  1. #1201
    Join Date
    February 2014
    Posts
    293

    Get client's current channel

    Hey,

    Is anyone aware of any way to grab the client's current UID, I've checked all the returned results in an array from the client's information when pulled from the database but that doesn't seem to return the current client's channel.

    Anyone have any code that can grab this?

    Thanks!

  2. #1202
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    Quote Originally Posted by Patrick1164 View Post
    Is anyone aware of any way to grab the client's current UID, I've checked all the returned results in an array from the client's information when pulled from the database!
    Wait what?
    1. Are you talking about the UID oder CID?
    2. Are you trying to use MySQL to find out a channel? That's a) unsupported and b) can't work because CID is an in-memory property of course. Why would anyone ever save this a database? The database only has stuff that matters after a server has been restarted.

  3. #1203
    Join Date
    February 2015
    Posts
    1

    Question List all clients

    Hey guys is there a way to improve my script? I would like it also to show offline users. I ask because I'm stuck.
    PHP Code:
        <h3>Admins:</h3>
        <?php    
            
    foreach($ts3_VirtualServer->serverGroupGetByName("Admin") as $admin)
            {
                echo 
    $admin."<br/>";
            }  
        
    ?>
        <h3>Guests:</h3>
        <?php
            
    foreach($ts3_VirtualServer->serverGroupGetByName("Guest") as $guest)
            {
                echo 
    $guest."<br/>";
            }  
        
    ?>
    I was thinking about changing SQLite database to MySQL. Then i could import it from table? Is it a safe way? Please, correct me if I'm wrong.
    Thank you for your support.

    @Mickroz
    Thank you for an answer! I worked it out by myself in the same day!

  4. #1204
    Join Date
    February 2014
    Posts
    293
    Quote Originally Posted by numma_cway View Post
    Wait what?
    1. Are you talking about the UID oder CID?
    2. Are you trying to use MySQL to find out a channel? That's a) unsupported and b) can't work because CID is an in-memory property of course. Why would anyone ever save this a database? The database only has stuff that matters after a server has been restarted.
    I've just been trying any method I can think of to find the current client's channel, that's all. I'm just explaining what I've tried. Yes, I may be wrong but I'm just looking for some help on how I can get the current channel.

  5. #1205
    Join Date
    December 2013
    Posts
    13
    Quote Originally Posted by Patrick1164 View Post
    I've just been trying any method I can think of to find the current client's channel, that's all. I'm just explaining what I've tried. Yes, I may be wrong but I'm just looking for some help on how I can get the current channel.
    PHP Code:
    foreach ($ts3_VirtualServer->clientList() as $client)
    {
        if (
    $client->client_type == 1) continue;
        
    print_r($client);
        
    $current_cid $client->client_channel_group_inherited_channel_id;

    Quote Originally Posted by 9611262 View Post
    Hey guys is there a way to improve my script? I would like it also to show offline users. I ask because I'm stuck.
    PHP Code:
        <h3>Admins:</h3>
        <?php    
            
    foreach($ts3_VirtualServer->serverGroupGetByName("Admin") as $admin)
            {
                echo 
    $admin."<br/>";
            }  
        
    ?>
        <h3>Guests:</h3>
        <?php
            
    foreach($ts3_VirtualServer->serverGroupGetByName("Guest") as $guest)
            {
                echo 
    $guest."<br/>";
            }  
        
    ?>
    I was thinking about changing SQLite database to MySQL. Then i could import it from table? Is it a safe way? Please, correct me if I'm wrong.
    Thank you for your support.

    @Mickroz
    Thank you for an answer! I worked it out by myself in the same day!
    no problem

    Anyone knows a way to disconnect from a server?

  6. #1206
    Join Date
    February 2014
    Posts
    293
    Quote Originally Posted by Mickroz View Post
    PHP Code:
    foreach ($ts3_VirtualServer->clientList() as $client)
    {
        if (
    $client->client_type == 1) continue;
        
    print_r($client);
        
    $current_cid $client->client_channel_group_inherited_channel_id;

    Thanks! I'll have a good play with that and see if I can get the intended idea working as planned, I was wondering if it would have to be done via ClientList but had no idea how to get the channel id, many thanks!

  7. #1207
    Join Date
    November 2012
    Posts
    38
    Weird problem about getaddrinfo error ;/

    Code:
    [ERROR] php_network_getaddresses: getaddrinfo failed: Name or service not known
    It seems like its error with DNS, but...
    I have no idea how can i other set it up.

    Code:
    $ts3 = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=9987&blocking=0");
    Using IP of my VPS server, all domains working properly.
    Not sure if, but i got reverse zone for ip of my vps thats reversing to 1 name server:
    Code:
    123.123.123.123.in-addr.arpa	Default	ns1.mydomain.com.
    Im using my own name server, via Bind DNS (using webmin to set it up), and my apache webserver is listening on port:80 so it shouldnt interfere.

    I would be really glad for any kind of help...

    edit::
    or do i need to configure my own tsdns server as well ??

    edit2::
    Solved

    Just be sure to not use special signs in ur password ^^
    Last edited by konradmm; January 19th, 2016 at 03:50 AM.

  8. #1208
    Join Date
    December 2012
    Location
    Bavaria, DE
    Posts
    120
    i want to change the the client description and if i do that
    PHP Code:
                    $proberties = array("client_description" => "Ausgetragener Client");
                    if (
    $client->modify($proberties)); 
    i got an error
    Fatal error: Call to a member function modify() on array

  9. #1209
    Join Date
    November 2012
    Posts
    38
    Quote Originally Posted by TheYesFlofus View Post
    i want to change the the client description and if i do that
    PHP Code:
                    $proberties = array("client_description" => "Ausgetragener Client");
                    if (
    $client->modify($proberties)); 
    i got an error
    Fatal error: Call to a member function modify() on array
    not a pro but why not using just $client['client_description'] = "Ausgetragener Client"; ?
    Goin with ur way it should be more like $client->getProperty("client_description")->modify...



    Btw writing with another problem...

    Click image for larger version. 

Name:	1453238133.png 
Views:	246 
Size:	3.5 KB 
ID:	13428

    Seems like it doesnt read created value properly oO
    Or its not the time-stamp of when teamspeak server was created ?
    Last edited by konradmm; January 19th, 2016 at 11:03 PM.

  10. #1210
    Join Date
    January 2016
    Posts
    1

    [TeamSpeak3] PHP Framework - Show only 5 virtual server

    Hello!

    How can I show only 5 virtual server with PHP framework?

    Thank you!

  11. #1211
    Join Date
    January 2016
    Posts
    1

    Bot timeout

    I'm trying to build a ts3 bot with this framework.
    The problem I have is that if there are no events in 10 minutes the bot gets disconnected.
    I tried to solve it like this but since "$ts3->getAdapter()->wait();" is holding up the whole execution of the script it does not work.
    How do I solve this?

    Code:
    require_once("libraries/TeamSpeak3/TeamSpeak3.php");
    $ts3 = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=9987&nickname=nickname&blocking=0");
    
    $ts3->notifyRegister("textprivate");
    
    TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyTextmessage", "onTextmessage");
    
    $time = time();
    while(1){
    	if($time < time()-480){
    		$ts3->whoami();
    	}
    	$ts3->getAdapter()->wait();
    }
    
    function onTextmessage(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3_Node_Host $host){
    	echo var_dump($event);
    }
    Last edited by felix21; January 29th, 2016 at 04:32 PM.

  12. #1212
    Join Date
    September 2014
    Posts
    23

    Question offline user

    hello how i can get client_channel_group_id for offlien user
    Last edited by a3DaM; January 29th, 2016 at 08:23 AM.

  13. #1213
    Join Date
    January 2016
    Location
    Sweden
    Posts
    1
    Quote Originally Posted by a3DaM View Post
    hello how i can get client_channel_group_id for offlien user
    To be able to get info of offline users, you must have a database where these type of values are specified.
    If not, there is no way to pull info from a user, because that is a real-time job.

    I hope you understand what I mean

  14. #1214
    Join Date
    September 2014
    Posts
    23
    Quote Originally Posted by BayxX View Post
    To be able to get info of offline users, you must have a database where these type of values are specified.
    If not, there is no way to pull info from a user, because that is a real-time job.

    I hope you understand what I mean
    no men you can ♥ Click image for larger version. 

Name:	RKW4M8R.png 
Views:	137 
Size:	1.6 KB 
ID:	13478
    Last edited by a3DaM; February 1st, 2016 at 01:50 PM.

  15. #1215
    Join Date
    December 2013
    Posts
    13
    Quote Originally Posted by felix21 View Post
    I'm trying to build a ts3 bot with this framework.
    The problem I have is that if there are no events in 10 minutes the bot gets disconnected.
    I tried to solve it like this but since "$ts3->getAdapter()->wait();" is holding up the whole execution of the script it does not work.
    How do I solve this?

    Code:
    require_once("libraries/TeamSpeak3/TeamSpeak3.php");
    $ts3 = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=9987&nickname=nickname&blocking=0");
    
    $ts3->notifyRegister("textprivate");
    
    TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyTextmessage", "onTextmessage");
    
    $time = time();
    while(1){
    	if($time < time()-480){
    		$ts3->whoami();
    	}
    	$ts3->getAdapter()->wait();
    }
    
    function onTextmessage(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3_Node_Host $host){
    	echo var_dump($event);
    }
    try this http://forum.teamspeak.com/threads/5...361#post346361


    @a3DaM you can get the id if you know the users cldbid.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PHP Framework
    By Multivit4min in forum Permission System
    Replies: 1
    Last Post: June 29th, 2015, 12:28 PM
  2. PHP Framework
    By phil998 in forum Server Support
    Replies: 0
    Last Post: February 25th, 2015, 07:27 PM
  3. TS3 PHP Framework Visualizations
    By Ronin Design in forum Tools / Web Based
    Replies: 2
    Last Post: February 22nd, 2015, 06:04 AM
  4. Extraction using the Framework
    By HarryMW in forum Tools / Web Based
    Replies: 1
    Last Post: August 3rd, 2012, 08:04 PM
  5. Teamspeak, PHP Framework?
    By mario2027 in forum General Questions
    Replies: 1
    Last Post: December 21st, 2010, 10: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
  •