[Web Script] copy the function of this Channel Creator

TheSpartaPT

Member
Jul 17, 2016
10
0
36
Name of the script: channel creator

Functions of the script: so if someone could copy this web script or just the core functions like create a channel with 3 sub channels (newest channel created is always going to the end of the list, the created channels should look like this: *screenshot below*) a tick button to move to the channel created, if someone who has channel admin on any channel tries to create another channel tell him that he is not eligible, don't worry about the loading screen and the style of the page. also it only works if you're connected to the teamspeak server so that way you don't have to specify the Unique ID

Why do you want it: i want it because i can't find one that does the exact same thing

Screenshots: http://prnt.sc/bvh8kn

Orginal source: *REMOVED*

Other notes: if you're thinking about helping me thanks in advance :)
 
Last edited by a moderator:

Sempz

Member
May 14, 2016
23
2
35
I allready shared the script with him lol , I was talking with him on his own teamspeak... i shared but his hoster can't support the script cuz i think the script is only for linux. Sorry for my bad english :) but if some one need the code of this: https://r4p3.net/threads/create-channel-web-help.1039/ with subchannels i can give you
Here is the code:
Code:
<?php session_start(); ?>
<?php

    date_default_timezone_set('Portugal'); //Change Here!
    require_once("libraries/TeamSpeak3/TeamSpeak3.php");
    include 'data/config.php';


    function getClientIp() {
        if (!empty($_SERVER['HTTP_CLIENT_IP']))
            return $_SERVER['HTTP_CLIENT_IP'];
        else if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
            return $_SERVER['HTTP_X_FORWARDED_FOR'];
        else if(!empty($_SERVER['HTTP_X_FORWARDED']))
            return $_SERVER['HTTP_X_FORWARDED'];
        else if(!empty($_SERVER['HTTP_FORWARDED_FOR']))
            return $_SERVER['HTTP_FORWARDED_FOR'];
        else if(!empty($_SERVER['HTTP_FORWARDED']))
            return $_SERVER['HTTP_FORWARDED'];
        else if(!empty($_SERVER['REMOTE_ADDR']))
            return $_SERVER['REMOTE_ADDR'];
        else
            return false;
    }

    $connect = "serverquery://".$USER_QUERY.":".$PASS_QUERY."@".$HOST_QUERY.":".$PORT_QUERY."/?server_port=".$SERVER_PORT."";
    $ts3 = TeamSpeak3::factory($connect);
    $ts3->execute("clientupdate", array("client_nickname" => $NICK_QUERY));
    $FLAG = false;

    foreach ($ts3->clientList(array('client_type' => '0', 'connection_client_ip' => getClientIp())) as $client) {
        $clientuid = $client->client_unique_identifier;
        $client_nickname = $client->client_nickname;
        $client_clid = $client->clid;
        $FLAG = true;
        break;
    }
    if (!$FLAG){
        echo "<p><b>".$lang['f_connectts'].".</b></p><br/>";
        header("refresh: 10; url = ./");
        die;
    }

    if (isset($_POST["create"])) {

        $channelname = $_POST['channelname'];
        $password = $_POST['password'];
        $unixTime = time();
        $realTime = date('[Y-m-d]-[H:i]',$unixTime);
        $channel_admin_group = 5;
        $random = mt_rand(0,10000);

        try
        {
       $cid1 = $ts3->channelCreate(array(
       "channel_name" => "[*spacer$random]▃",
       "channel_password" => "$password",
       "channel_flag_permanent" => "1",
       "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Data: '.$realTime.'[*]Dono da sala: ' . $client_nickname . '[/list][/b]',
       "channel_order" => "$order"
        ));
            $cid = $ts3->channelCreate(array(
            "channel_name" => "[cspacer$random]★ $channelname ★",
            "channel_password" => "$password",
            "channel_flag_permanent" => "1",
            "channel_description" => '[center][b][u][color=red]'.$channelname.'[/color][/u][/b][/center][hr][b][list][*]Data: '.$realTime.'[*]Dono da sala: ' . $client_nickname . '[/list][/b]',
       "channel_order" => "$order"
    ));
            $cid1 = $ts3->channelCreate(array(
            "channel_name" => "Convivio #1",
            "channel_password" => "$password",
            "channel_flag_permanent" => "1",
            "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Data: '.$realTime.'[*]Dono da sala: ' . $client_nickname . '[/list][/b]',

       "cpid" => $cid,
    ));
            $cid1 = $ts3->channelCreate(array(
            "channel_name" => "Convivio #2",
            "channel_password" => "$password",
            "channel_flag_permanent" => "1",
            "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Data: '.$realTime.'[*]Dono da sala: ' . $client_nickname . '[/list][/b]',

       "cpid" => $cid,
    ));
            $cid1 = $ts3->channelCreate(array(
            "channel_name" => "A Jogar",
            "channel_password" => "$password",
            "channel_flag_permanent" => "1",
            "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Data: '.$realTime.'[*]Dono da sala: ' . $client_nickname . '[/list][/b]',

       "cpid" => $cid,
    ));
            $ts3->clientGetByUid($clientuid)->setChannelGroup($cid1, $channel_admin_group);
            $ts3->clientMove($client_clid, $cid1);

        }
        catch(Exception $e)
        {
            echo "Error (ID " . $e->getCode() . ") <b>" . $e->getMessage() . "</b>";
        }
    }
?>
<!DOCTYPE html>
<html lang="en" class="no-js">
    <head>
        <meta charset="UTF-8" />
        <title>NEW-SENSE</title>
        <link rel="stylesheet" type="text/css" href="css/demo.css" />
        <link rel="stylesheet" type="text/css" href="css/style.css" />
        <link rel="stylesheet" type="text/css" href="css/animate-custom.css" />
    </head>
    <body>
        <div class="container">
            <header>
                <h1>Cria a tua sala<span> Permanente</span></h1>
            </header>
            <section>   
                <div id="container_demo" >
                    <div id="wrapper">
                        <div id="login" class="animate form">
                            <form  method="post" autocomplete="on">
                                <h1>Settings</h1>
                                <p>
                                    <label  class="uname" data-icon="u" > Ola, <?php echo $client_nickname; ?></label>
                                    <input  readonly type="text" value="<?php echo $clientuid; ?>"/>
                                </p>
                                <p>
                                    <label  class="uname" data-icon="u" > Nome do Canal </label>
                                    <input  name="channelname" required="required" type="text" placeholder="My Super Channel."/>
                                </p>
                                <p>
                                    <label class="youpasswd" data-icon="p"> Passwords dos canais</label>
                                    <input name="password" required="required" type="text" placeholder="eg. X8df!90EO" />
                                </p>
                                <p class="login button">
                                    <input type="submit" name="create" value="Criar Canais!" />
                                </p>
                            </form>
                        </div>
            
                    </div>
                </div>
            </section>
        </div>
    </body>
</html>
My ts: *REMOVED*
the site if you wan't to test the script: *REMOVED* YOU NEED TO BE CONNECTED TO THE TEAMSPEAK SERVER
This script was been created by
EscuderoKevin ( THANK YOU FOR YOUR HELP )
i just add more channels :)
 
Last edited by a moderator:

TheSpartaPT

Member
Jul 17, 2016
10
0
36
nvm i found it on another website when google searching "complex channel creator web" it's basically the same as the other one that is public that you gave me @Sempz .
 

Sempz

Member
May 14, 2016
23
2
35
*LINK REMOVED*
EscuderoKevin on r4p3 created that script with the name: "simple Channel Creator" and some one created the same that he created with the same code and gave the thread name "Complex Channel Creator" . They did nothing xD
 
Last edited by a moderator:

LIFE

Member
Oct 1, 2016
19
1
38
EscuderoKevin on r4p3 created that script with the name: "simple Channel Creator" and some one created the same that he created with the same code and gave the thread name "Complex Channel Creator" . They did nothing xD
You not have Permission to create channel. why is that :(
 

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
You not have Permission to create channel. why is that :(
Did you set the permissions correctly?
if i remember correctly, to use this script you must have a server group that allows you to use it. (you set it in the config)
 
Top