Tutorial Complex Channel Creator [WEB]

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
Hi all, i made this channel creator WEB for R4p3 Vip.

Look.

Features.
  • Only Certain Groups (Permission ID)
  • Anti Spam
  • Create 2 Channels in 1 Spacer
  • Can Set Order
  • Move Client
  • Add Channel Admin in 2 channels.
  • Clean and Good :)

How To Work:

  1. Upload All Files to Website
  2. Edit Config.php
  3. Good Luck.

index.php
PHP:
<?php session_start(); ?>
<?php
    if(!isset($_SESSION['ts3_last_query']))
    $_SESSION['ts3_last_query'] = microtime(true);
   
    if($_SESSION['ts3_last_query'] >= microtime(true))
    die('You Need Wait 10 Seconds To Create Channel Again');
   
    $_SESSION['ts3_last_query'] = microtime(true)+10.0;
   
    date_default_timezone_set('America/Argentina/Buenos_Aires'); //Change Here!
    require_once("libraries/TeamSpeak3/TeamSpeak3.php");
    include 'data/config.php';
   
    if (isset($_POST["create"])) {
       
       
        $clib = $_POST['uid'];
       
        $channelname = $_POST['channelname'];
        $password = $_POST['password'];
       
        $unixTime = time();
        $realTime = date('[Y-m-d]-[H:i]',$unixTime);
        $continue = "0";
       
        $rand = mt_rand(1, 9999);
       
        $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));
       
        $client_clib = $ts3->clientGetByUid($clib);
        $clientuid= $client_clib[client_unique_identifier];
        $client_nickname =     $client_clib[client_nickname];
       
       
        foreach(explode(",", $client_clib["client_servergroups"]) as $sgid)
        {
            if($sgid == $idgroup){
                $continue = "1";
                echo "tiene permiso";
            }
            else{
                echo "You not have Permission to create channel.";
               
            }
           
            break;
        }
       
        if($continue == "1")
        {
           
            try
            {
                $spacertop = $ts3->channelCreate(array(
                "channel_name"          => "[cspacer$rand]$channelname",
                "channel_topic"             => "Created By Web",
                "channel_codec"          => TeamSpeak3::CODEC_SPEEX_ULTRAWIDEBAND,
                "channel_codec_quality"  => 0x08,
                "channel_flag_permanent" => TRUE,
                "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Date: '.$realTime.'[*]Owner: ' . $client_nickname . '[/list][/b]',
                "channel_password" => "$password",
                "channel_flag_maxclients_unlimited" => 0,
                "channel_order"          => $order,
                ));     
               
               
                $firtschannel = $ts3->channelCreate(array(
                "channel_name" => "1. $channelname",
                "channel_password" => "$password",
                "channel_flag_permanent" => "1",
                "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Date: '.$realTime.'[*]Owner: ' . $client_nickname . '[/list][/b]',
                "cpid"                => $spacertop,
                ));
               
                $secondchannel = $ts3->channelCreate(array(
                "channel_name" => "2. $channelname",
                "channel_password" => "$password",
                "channel_flag_permanent" => "1",
                "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Date: '.$realTime.'[*]Owner: ' . $client_nickname . '[/list][/b]',
                "cpid"                => $spacertop,
                ));
               
               
                $ts3->clientGetByUid($clientuid)->setChannelGroup($firtschannel, $channel_admin_group);
                $ts3->clientGetByUid($clientuid)->setChannelGroup($secondchannel, $channel_admin_group);
                $ts3->clientMove($client_clib, $firtschannel);
               
            }
            catch(Exception $e)
            {
                echo "Error (ID " . $e->getCode() . ") <b>" . $e->getMessage() . "</b>";
            }
            $continue= "0";   
           
        }
       
    }
?>
<!DOCTYPE html>
<html lang="en" class="no-js">
    <head>
        <meta charset="UTF-8" />
        <title>Complex Channel Create</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>Complex Channel<span> Creator</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" > Unique ID </label>
                                    <input  name="uid" type="text" placeholder="Ctrl + I In TS3 Server"/>
                                </p>
                                <p>
                                    <label  class="uname" data-icon="u" > Channel Name </label>
                                    <input  name="channelname" required="required" type="text" placeholder="My Super Channel."/>
                                </p>
                                <p>
                                    <label class="youpasswd" data-icon="p"> Channel Password</label>
                                    <input name="password" required="required" type="text" placeholder="eg. X8df!90EO" />
                                </p>
                                <p class="login button">
                                    <input type="submit" name="create" value="Create!" />
                                </p>
                            </form>
                        </div>
                       
                    </div>
                </div> 
            </section>
        </div>
    </body>
</html>
PHP:
<?php

$HOST_QUERY = "xxxx";
$PORT_QUERY = "10011";
$USER_QUERY = "serveradmin";
$PASS_QUERY = "xxxxxxx";
$SERVER_PORT = "9965";
$NICK_QUERY = "Worhost";

$order = "xxxxx";
$idgroup = "xxxx";
$channel_admin_group = "xxxx";

?>

index.php
Mg9aecW.png

LVGMN7q.png

Anti Span.
xYobYfA.png

If you dont have permission.
XgWlJYq.png

Channel Created + Channel Admin + Move Client
2dWu9gK.png

IG3X6Ha.png

♥ Never Stay Alone ♥
 

scaryscar

Member
Mar 17, 2016
4
0
35
Its good, but make some security for it.
Make like a security check for uid. EX:
when u click Create it will poke you with random code and u will have to verify on website or also check the IP of website * Website client ip is; $ip = $_SERVER['REMOTE_ADDR'] with $client['connection_client_addres'] :)
 

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
Its good, but make some security for it.
Make like a security check for uid. EX:
when u click Create it will poke you with random code and u will have to verify on website or also check the IP of website * Website client ip is; $ip = $_SERVER['REMOTE_ADDR'] with $client['connection_client_addres'] :)
In a while i am going to provide it a bit edited, that will automatically find the UID from your IP Address, so you won't spam the rest members!
 
  • Like
Reactions: sad

sad

Member
Sep 19, 2016
18
8
46
great friend
next update add auto detect uid = better
thanks for share
 
Top