Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 2 of 2
  1. #1
    Join Date
    January 2014

    Stop PHP Framework throwing errors when TeamSpeak server is offline


    I am trying to show the status of a TeamSpeak server (online/offline) aswell as the amount of clients connected on my website. I've got the code for the clients connected and that works fine, the only issue I'm having is the amount of errors that it spits out if the TeamSpeak server is offline.
    So my question is, how can I stop those errors? When it's offline I just want it to echo "Offline" rather than the errors which stop the page from loading.

    PHP Code:
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://username:[email protected]:10011/?server_port=9987"); 
    This is the code I am using right now, which is spitting out errors if the server is offline.

    Fatal error: Uncaught exception 'TeamSpeak3_Transport_Exception' with message 'No connection could be made because the target machine actively refused it. '

  2. #2
    Join Date
    July 2006
    You cannot prevent the framework from throwing exceptions but you can catch them by surrounding your code with a try/catch block.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Teamspeak PHP Framework Download ALL Icons from Server
    By Multivit4min in forum Tools / Web Based
    Replies: 1
    Last Post: June 29th, 2015, 01:01 PM
  2. Teamspeak Keeps throwing me out
    By TheNickLoynes in forum Server Support
    Replies: 1
    Last Post: June 28th, 2015, 04:39 AM
  3. Qtcore Framework causes direct sound errors
    By Baltimore_Bullet in forum Bug Reports [EN/DE]
    Replies: 6
    Last Post: April 12th, 2013, 11:30 AM
  4. Replies: 31
    Last Post: January 19th, 2010, 09:25 PM

Posting Permissions

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