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
    February 2014
    Posts
    293

    TeamSpeak 3 PHP get clid

    Hi Guys,

    I'm trying to create a script to get ClientID by Unique ID or Client Name which will then send a message to the ClientID based on text box input. I'm having issues getting the CID, if anyone could help I'd really appreciate this.

    Based on the PHP framework API and googling I've got this so far.

    $cluid = <UID HERE>
    $ts3->execute("clientgetids", array("cluid" => $cluid))->toAssocArray("clid");

    But this doesn't allow me to return CLID to a variable, any ideas?

  2. #2
    Join Date
    June 2011
    Location
    Baghdad, Iraq
    Posts
    367
    Hi,

    and why?

    why not just get the client and send the message ?? like:

    PHP Code:
    $cluid "SomeUID";
    $msg $_POST['inputBox'];
    $ts3->clientGetByUid($cluid)->message($msg); 

  3. #3
    Join Date
    February 2014
    Posts
    293
    Hey,

    I did try something very similar to that but it just error'd. I tried using a friends UID and it worked! Not sure why my UID doesn't work.

    Thanks for the help!

  4. #4
    Join Date
    June 2011
    Location
    Baghdad, Iraq
    Posts
    367
    what was the error ?

    try & catch > post the error

    PHP Code:
    try {
        
    $cluid "SomeUID";
        
    $msg $_POST['inputBox'];
        
    $ts3->clientGetByUid($cluid)->message($msg);  
    } catch (
    Exception $e) {
        echo 
    $e->getMessage();


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ClientQuery: Getting my CLID
    By Triscopic in forum Client Plugins / Lua Scripts
    Replies: 6
    Last Post: August 6th, 2011, 10:51 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
  •