Forum

Page 52 of 100 FirstFirst ... 242505152535462 ... LastLast
Results 766 to 780 of 1493
  1. #766
    Join Date
    November 2012
    Posts
    8
    I have 3 Questions:

    Is possible change the banner from Teamspeak with this Api? I want change the banner with Cron Time, How can I add or remove "users offline" from a group? and How can I show the Groups ID from a User?

    Thanks

    Sorry for my bad english.
    Last edited by MrRoboto; December 13th, 2013 at 07:39 AM.

  2. #767
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,510
    Quote Originally Posted by Zoker View Post
    2. Would it be also possible to add serveruptime output? So the number (like 95,9%) will be outputed, but please only the number 95,9 without the "%"
    Calculating the server uptime in % is nothing you can do with the built-in methods of the framework. You'll need to query the status of the server multiple times per day and save this info in some kind of database.

    Quote Originally Posted by Zoker View Post
    1. Would it be possible to add the url according to the server the server name in the viewer code?
    3. And please remove the "align:top" from images and "summary" from viewer, its not html valid and does not effect anything
    Sorry, but I'll not modify the output of the current HTML viewer pattern. You can either modify the existing TeamSpeak3_Viewer_Html class or implement your own viewer by creating your own class based on TeamSpeak3_Viewer_Interface. Basically, everything you want is possible by editing a few lines.

    Quote Originally Posted by MrRoboto View Post
    Is possible change the banner from Teamspeak with this Api? I want change the banner with Cron Time, How can I add or remove "users offline" from a group? and How can I show the Groups ID from a User?
    Have a look at this code snippet in the documentation:

    http://docs.planetteamspeak.com/ts3/....html#example4

    To get a list of group IDs for a specific client, you can use the memberOf() method.

  3. #768
    Join Date
    December 2013
    Posts
    18
    You can calculate the server uptime, by checking the start and stop entries in the log files.
    So if server stop on 5pm and started on 6pm you have 1 hour of downtime.

    And why you will not include it?
    And why do you want to create invalid html code?
    Check your code on validator.w3.org its wrong...

    And how could I get the first element (the servername) and set a link for it?

  4. #769
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,510
    Quote Originally Posted by Zoker View Post
    You can calculate the server uptime, by checking the start and stop entries in the log files.
    So if server stop on 5pm and started on 6pm you have 1 hour of downtime.
    Searching the server logs for start/stop dates via ServerQuery is a bad idea as this would probably take a while for servers that are logging client, channel and permission events.

    Quote Originally Posted by Zoker View Post
    And why you will not include it?
    And why do you want to create invalid html code?
    Check your code on validator.w3.org its wrong...
    For two simple reasons:

    1. I don't want to cause any issues for people using the unmodified HTML viewer class and break their output.
    2. As I already stated, you can create your own implementation of an HTML viewer (or just modify the output pattern). I'd recommend generating a JSON string or formatting the viewer as a list.


    Quote Originally Posted by Zoker View Post
    And how could I get the first element (the servername) and set a link for it?
    Checking if the node is a TeamSpeak3_Node_Server object here and adding some custom code for it is probably the right way to go.

  5. #770
    Join Date
    December 2013
    Posts
    18
    In which way you could cause and issus by removing invalid html tags? The "align:top" as well as the "summary" are updated and to not cause anything. You can just take them away and the resalt will look the same

    Its also not so common to use hundrets of tables for creating such a view, but thats ok, because its valid html

  6. #771
    Join Date
    December 2013
    Posts
    12

    Question

    Hello Sir

    Great work! Keep developing it

    I tried this PHP framework but it's not working for me
    I always get
    Code:
    Fatal error: Uncaught exception 'TeamSpeak3_Transport_Exception' with message 'Connection timed out' in /home/ public_html/TS/libraries/TeamSpeak3/Transport/TCP.php:54 Stack trace: #0 /home/ public_html/TS/libraries/TeamSpeak3/Transport/TCP.php(108): TeamSpeak3_Transport_TCP->connect() #1 /home/ public_html/TS/libraries/TeamSpeak3/Adapter/ServerQuery.php(76): TeamSpeak3_Transport_TCP->readLine() #2 /home/ public_html/TS/libraries/TeamSpeak3/Adapter/Abstract.php(60): TeamSpeak3_Adapter_ServerQuery->syn() #3 /home/ public_html/TS/libraries/TeamSpeak3/TeamSpeak3.php(320): TeamSpeak3_Adapter_Abstract->__construct(Array) #4 /home/ public_html/TS/index.php(6): TeamSpeak3::factory('serverquery://s...') #5 {main} thrown in /home/ public_html/TS/libraries/TeamSpeak3/Transport/TCP.php on line 54
    I used this simple snipet
    Code:
    <?php
    
    // load framework files
    require_once("libraries/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:********@**.**.**.**:10011/?server_port=9987");
    
    ?>
    Any ideas?
    Thanks in advance,

    Note: PHP version is 5.3.27. A later version than 5.2.1. And the IP of the site is added to the query_ip_whitelist.txt and the server restarted after I added it.

  7. #772
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Are you able to to ping the server from where you are running the script?

  8. #773
    Join Date
    December 2013
    Posts
    12
    Quote Originally Posted by barricas View Post
    Are you able to to ping the server from where you are running the script?
    Stupid question maybe but I'm running this script on a non-VPS. Should it be ran on a VPS?

    EDIT: I'm able to ping to the IP.

  9. #774
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    No it is OK, when I'm developing stuff I run from my home IP.

    What about the server, does it have the 10011 port allowed in the firewall?

    If you have putty, open a connection to your server to the query port and select "Telnet".

    Or you can test with tools like yatqa.

  10. #775
    Join Date
    December 2013
    Posts
    12
    Quote Originally Posted by barricas View Post
    No it is OK, when I'm developing stuff I run from my home IP.

    What about the server, does it have the 10011 port allowed in the firewall?

    If you have putty, open a connection to your server to the query port and select "Telnet".

    Or you can test with tools like yatqa.
    I've already used YaTQa (works) and I've SSH access to the server but I've the same problem when I want to connect with the server via the Ts3 Webinterface of Pyschokiller.

  11. #776
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    That is very weird.

    Try to install tcpdump, then if I recall correctly the command is:

    tcpdump -n host YOUR_IP_HERE -vvv

    Execute that command in SSH and then execute the script that connects to the server.
    If the script is able to reach the server, you will get output in the TCPDUMP, if you can't it is some other problem outside your server network.

  12. #777
    Join Date
    December 2013
    Posts
    12
    Quote Originally Posted by barricas View Post
    That is very weird.

    Try to install tcpdump, then if I recall correctly the command is:

    tcpdump -n host YOUR_IP_HERE -vvv

    Execute that command in SSH and then execute the script that connects to the server.
    If the script is able to reach the server, you will get output in the TCPDUMP, if you can't it is some other problem outside your server network.
    I'm going to instal PHP then on my VPS but TSviewer and GameTracker are working.

    Note: when using the PHP code I'm nothing seeing something in the TCPDUMP command but when I ping I see results... strange.
    Last edited by nomis002; December 13th, 2013 at 10:00 PM. Reason: Note

  13. #778
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Ok. If that is the case, maybe your PC firewall is blocking PHP from making external requests?

  14. #779
    Join Date
    December 2013
    Posts
    12
    Quote Originally Posted by barricas View Post
    Ok. If that is the case, maybe your PC firewall is blocking PHP from making external requests?
    The site with which I'm making the requests is a 'normal' website not my local computer. I'll contact my webhost.

  15. #780
    Join Date
    December 2013
    Posts
    12
    Quote Originally Posted by barricas View Post
    Ok. If that is the case, maybe your PC firewall is blocking PHP from making external requests?
    I needed to repost this due flood control or such. I'm running this script on a website not on my local computer. I'll contact my webhost maybe.

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, 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
  •