Forum

Results 1 to 3 of 3
  1. #1
    Join Date
    January 2016
    Location
    Binghamton, NY
    Posts
    3

    Help with showing Teamspeak Server channels / users in PHP (webpage)

    I went through other posts that seemed like duplicates but can't resolve my problem I am using the framework here and used the "11. Create a simple TSViewer for your Website" code from the documentation here trying to get it to work on my webpage.

    My code:
    PHP Code:
    // load framework files
    require_once("includes/libraries/TeamSpeak3/TeamSpeak3.php");

    // connect to server, authenticate and spawn an object for the virtual server on port xxxx
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://<my query login name>:<my query password>@<my ts3 server plain IP>:<query port>/?server_port=<main port>");

    // build and display HTML treeview using custom image paths (remote icons will be embedded using data URI sheme)
    echo $ts3_VirtualServer->getViewer(new TeamSpeak3_Viewer_Html("images/viewericons/""images/countryflags/""data:image")); 
    The error(s) that I receive trying to test my code:
    PHP Code:
    Warningstr_pad(): Padding string cannot be empty in A:\wamp64\www\heartfx\includes\libraries\TeamSpeak3\Helper\String.php on line 308
    Warning
    str_pad(): Padding string cannot be empty in A:\wamp64\www\heartfx\includes\libraries\TeamSpeak3\Helper\String.php on line 308 
    and just to make sure I am using right directory here is how my directory(s) look:

    Name:  ee495be5bf.png
Views: 602
Size:  22.9 KB
    Last edited by lowheartrate; November 25th, 2016 at 07:03 AM.

  2. #2
    Join Date
    October 2017
    Posts
    1
    push
    I get the same error. I have no clue why...

    PHP Code:
        include(base_path() . '/themes/assets/plugins/teamspeak3/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");
        
    // build and display HTML treeview using custom image paths (remote icons will be embedded using data URI sheme)
        
    echo $ts3_VirtualServer->getViewer(new TeamSpeak3_Viewer_Html("images/viewericons/""images/countryflags/""data:image")); 

  3. #3
    Join Date
    December 2018
    Posts
    1
    I have the same porblem


    Quote Originally Posted by bluefire56 View Post
    push
    I get the same error. I have no clue why...

    PHP Code:
        include(base_path() . '/themes/assets/plugins/teamspeak3/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");
        
    // build and display HTML treeview using custom image paths (remote icons will be embedded using data URI sheme)
        
    echo $ts3_VirtualServer->getViewer(new TeamSpeak3_Viewer_Html("images/viewericons/""images/countryflags/""data:image")); 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: March 22nd, 2016, 06:49 AM
  2. Replies: 2
    Last Post: April 19th, 2011, 04:09 PM
  3. Replies: 0
    Last Post: April 19th, 2011, 09:37 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
  •