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 2 of 2
  1. #1
    Join Date
    November 2012
    Posts
    1

    PHP Connection timed out

    Hello, my English is bad but I'll try that you understand me.

    I made a php script, the script sorts the channels alphabetically.
    I put the script on my VPS and working properly, but if I put the script on my web hosting, the following error appears "ERROR 0x6E: Connection timed out"

    PHP Code:
    try
    {
        
    $ts3 TeamSpeak3::factory("serverquery://" $cfg["user"] . ":" $cfg["pass"] . "@" $cfg["host"] . ":" $cfg["query"] . "/?server_port=" $cfg["voice"] . "#no_query_clients");
        
        
    $listacanal=$ts3->channelList();
        
    $i=0;
        foreach(
    $listacanal as $canal)
        {
            if(
    $canal['pid']==44)
            {
                
    $listac[$i]=$canal;
                
    $i++;
            }
        }
        echo 
    "SIN ORDENAR<br/>";
        foreach(
    $listac as $c)
        {
            echo 
    "cid: ".$c['cid']." | pid: ".$c['pid']." | order: ".$c['channel_order']." | nombre: ".$c['channel_name']."<br/>";
        }
        
    $listaorden=$listac;
        
    natcasesort($listaorden);
        echo 
    "CON ORDEN<br/>";
        foreach(
    $listaorden as $c)
        {
            echo 
    "cid: ".$c['cid']." | pid: ".$c['pid']." | order: ".$c['channel_order']." | nombre: ".$c['channel_name']."<br/>";
        }
        
        
        
    $ban=0;
        foreach(
    $listaorden as $c)
        {
            if(
    $ban==0)
            {
                
    //$ts3->channelMove($c['cid'],$c['pid'],$ban);
                
    $ts3->execute("channeledit", array("cid" => $c['cid'], "channel_order" => $ban));
                
    $ban=1;
                
    $cidviejo=$c['cid'];
            }
            else
            {
                
    $ts3->execute("channeledit", array("cid" => $c['cid'], "channel_order" => $cidviejo));
                
    $cidviejo=$c['cid'];
            }
        }
    }
    catch(
    Exception $e)
    {
        echo 
    "<p><b>ERROR 0x" dechex($e->getCode()) . "</b>: " htmlspecialchars($e->getMessage()) . "</p>";

    What should I modify in my web hosting for the script to work properly?

    I apologize again for my bad English (google translator)

  2. #2
    Join Date
    September 2012
    Posts
    6,079
    Your webhoster probably blocks external connections (or certain connections at least).
    Your server's firewall might also block the connection.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: June 13th, 2013, 09:28 AM
  2. connection timed out
    By Aviator in forum Windows
    Replies: 0
    Last Post: April 29th, 2011, 10:23 PM

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
  •