[Script] Create Channel with Web

Ezel

Member
Joined
Mar 19, 2017
Messages
9
Reaction score
1
Points
35
Again that error , blank page.. can someone help me ?
 

Ezel

Member
Joined
Mar 19, 2017
Messages
9
Reaction score
1
Points
35
I managed to fix the problem.
For those who still have problems , delete all you have in crear.php and put this:
<?php
require_once ("TeamSpeak3.php");
include ('config.php');
error_reporting(0);
$ChannelName = $_POST['name'];
$idUnica = $_POST['idts'];
if (!$ChannelName || !$idUnica) {
echo "El nombre del channel y la ID unica tienen que estar";
exit();
}
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://" . $UserAdmin . ":" . $PWQuery . "@" . $IP_TS . ":" . $PuertoQuery . "/?server_port=" . $PuertoTS . "");
$ListaDeChannels = $ts3_VirtualServer->request("channellist")->toString();
if (strpos($ListaDeChannels, $ChannelName)) {
echo "El nombre del channel esta en uso, utiliza otro";
exit();
}
$clID = $ts3_VirtualServer->clientGetByUid($idUnica);
$top_cid = $ts3_VirtualServer->channelCreate(array(
"channel_name" => $ChannelName,
"channel_codec" => TeamSpeak3::CODEC_SPEEX_WIDEBAND,
"channel_flag_permanent" => TRUE,
));
$clID = $ts3_VirtualServer->clientGetByUid($idUnica);
$infoCliente = $ts3_VirtualServer->execute("clientgetnamefromuid", array(
"cluid" => $idUnica
))->toList();
$cldbid = strval($infoCliente['cldbid']);
$ts3_VirtualServer->execute("clientmove", array(
"clid" => $clID,
"cid" => $top_cid
));
$ts3_VirtualServer->execute("setclientchannelgroup", array(
"cldbid" => $cldbid,
"cid" => $top_cid,
"cgid" => '5'
));
echo "El channel se creo correctamente."
?>
 

EscuderoKevin

Well-Known Member
Joined
Jul 2, 2015
Messages
380
Reaction score
181
Points
130
I managed to fix the problem.
For those who still have problems , delete all you have in crear.php and put this:
<?php
require_once ("TeamSpeak3.php");
include ('config.php');
error_reporting(0);
$ChannelName = $_POST['name'];
$idUnica = $_POST['idts'];
if (!$ChannelName || !$idUnica) {
echo "El nombre del channel y la ID unica tienen que estar";
exit();
}
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://" . $UserAdmin . ":" . $PWQuery . "@" . $IP_TS . ":" . $PuertoQuery . "/?server_port=" . $PuertoTS . "");
$ListaDeChannels = $ts3_VirtualServer->request("channellist")->toString();
if (strpos($ListaDeChannels, $ChannelName)) {
echo "El nombre del channel esta en uso, utiliza otro";
exit();
}
$clID = $ts3_VirtualServer->clientGetByUid($idUnica);
$top_cid = $ts3_VirtualServer->channelCreate(array(
"channel_name" => $ChannelName,
"channel_codec" => TeamSpeak3::CODEC_SPEEX_WIDEBAND,
"channel_flag_permanent" => TRUE,
));
$clID = $ts3_VirtualServer->clientGetByUid($idUnica);
$infoCliente = $ts3_VirtualServer->execute("clientgetnamefromuid", array(
"cluid" => $idUnica
))->toList();
$cldbid = strval($infoCliente['cldbid']);
$ts3_VirtualServer->execute("clientmove", array(
"clid" => $clID,
"cid" => $top_cid
));
$ts3_VirtualServer->execute("setclientchannelgroup", array(
"cldbid" => $cldbid,
"cid" => $top_cid,
"cgid" => '5'
));
echo "El channel se creo correctamente."
?>
PHP:
<?php
    require_once ("TeamSpeak3.php");
    include ('config.php');
    
    error_reporting(0);
    
    $ChannelName = $_POST['name'];
    $idUnica = $_POST['idts'];
    
    if (!$ChannelName || !$idUnica) {
        echo "El nombre del channel y la ID unica tienen que estar";
        exit();
    }
    
    $ts3_VirtualServer = TeamSpeak3::factory("serverquery://" . $UserAdmin . ":" . $PWQuery . "@" . $IP_TS . ":" . $PuertoQuery . "/?server_port=" . $PuertoTS . "");
    $ListaDeChannels = $ts3_VirtualServer->request("channellist")->toString();
    
    if (strpos($ListaDeChannels, $ChannelName)) {
        echo "El nombre del channel esta en uso, utiliza otro";
        exit();
    }
    
    $clID = $ts3_VirtualServer->clientGetByUid($idUnica);
    
    $top_cid = $ts3_VirtualServer->channelCreate(array(
    "channel_name" => $ChannelName,
    "channel_codec" => TeamSpeak3::CODEC_SPEEX_WIDEBAND,
    "channel_flag_permanent" => TRUE,
    ));
    
    $clID = $ts3_VirtualServer->clientGetByUid($idUnica);
    
    $infoCliente = $ts3_VirtualServer->execute("clientgetnamefromuid", array(
    "cluid" => $idUnica
    ))->toList();
    
    $cldbid = strval($infoCliente['cldbid']);
    
    $ts3_VirtualServer->execute("clientmove", array(
    "clid" => $clID,
    "cid" => $top_cid
    ));
    
    $ts3_VirtualServer->execute("setclientchannelgroup", array(
    "cldbid" => $cldbid,
    "cid" => $top_cid,
    "cgid" => '5'
    ));
    
    echo "El channel se creo correctamente."
?>

Showme your error_log... are u using "execute" its not good idea.
 

Ezel

Member
Joined
Mar 19, 2017
Messages
9
Reaction score
1
Points
35
I have no error_log .. hmm , I don't know why.
 

EscuderoKevin

Well-Known Member
Joined
Jul 2, 2015
Messages
380
Reaction score
181
Points
130
I have no error_log .. hmm , I don't know why.
on top in file.php put this ->

PHP:
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
 

King123

Active Member
Joined
Aug 17, 2016
Messages
5
Reaction score
1
Points
75
Who can make to me function to get auto uid , and tell me where i need to put him ? In wich file ?
 

Mr-Malone

You risk and you will win
Joined
Sep 11, 2015
Messages
69
Reaction score
25
Points
108
All the problems you encounter, please send them to me privately, do not spam this topic with all the minor issues, and use it only for announcing the updates.
 

Mr-Malone

You risk and you will win
Joined
Sep 11, 2015
Messages
69
Reaction score
25
Points
108
@S I M P L E . I gave you all the help you needed, if you did not keep the settings made by me that does not mean you have to ask for support every time. I am sorry.

!! UPDATE : xx.12.2017 (Soon to launch.)

* Implementing the automatic completion of uniqid
* Channel quality panel setting ( opus voice, opus music )
* Automatic message after channel creation.

* A new graphical interface.
* Automatically fill out the channel description with user data and the date the channel was created.

* Solving the error 500
 

Mr-Malone

You risk and you will win
Joined
Sep 11, 2015
Messages
69
Reaction score
25
Points
108
Hello friends I came back with this promise update.

This is a 2.0 BETA version, so I expect the opinions and the problems you encounter.

How to install?

1. Read the file first (readmefirst.md)
2. Edit the config.cfg file with your server data
3. Upload the files (php needed)
4. Access the site and test it.

What do I need?

* A web host with php installed.
* An account query with channel creation privileges and user changes and shifts.

What does this version contain?

* Form in 3 interactive parts.
* Updated graphical interface
* Display the date the channel was created and its founder in the channel description.
* Displaying the unique ID and when the channel was created (preferably no one has access to editing the topic) in the channel TOPIC
* The error page in this case.
* Set the password both to the channel and to the channel.
* Set contact address
* Automatically complete the uniq-id.

Image:


Where can I download it?
 
Last edited:

dany112dany

Member
Joined
Jan 2, 2016
Messages
5
Reaction score
3
Points
38
Some feature for future :
1) Remove the creation of sub-channel( usually people want only one channel)
2) limit channel creation ( 1 per uniq id or something like that)
3) remove/change step 3 ( it's hard for normal user what it means Uniq ID so better wil be if will write somenting like : Ok <name from teamspeak of crient> are sure you want to make this channel ?)

PS. It's working very well :)
 
Last edited:

pipeter21

Active Member
Joined
Jul 5, 2017
Messages
15
Reaction score
3
Points
93
Hello friends I came back with this promise update.

This is a 2.0 BETA version, so I expect the opinions and the problems you encounter.

How to install?

1. Read the file first (readmefirst.md)
2. Edit the config.cfg file with your server data
3. Upload the files (php needed)
4. Access the site and test it.

What do I need?

* A web host with php installed.
* An account query with channel creation privileges and user changes and shifts.

What does this version contain?

* Form in 3 interactive parts.
* Updated graphical interface
* Display the date the channel was created and its founder in the channel description.
* Displaying the unique ID and when the channel was created (preferably no one has access to editing the topic) in the channel TOPIC
* The error page in this case.
* Set the password both to the channel and to the channel.
* Set contact address
* Automatically complete the uniq-id.

Image:


Where can I download it?
I need that the created channels were located above a spacer. Thanks. Eg, CSGO, League of legends, etc
 

Mr-Malone

You risk and you will win
Joined
Sep 11, 2015
Messages
69
Reaction score
25
Points
108
I need that the created channels were located above a spacer. Thanks. Eg, CSGO, League of legends, etc
Please be more explicit, and if you can send me a private message with your petitions.
 

metanoia

Active Member
Joined
Mar 15, 2018
Messages
3
Reaction score
0
Points
73
Hello.
So, something is not working. What data should I put here => $channelparent ?
 

metanoia

Active Member
Joined
Mar 15, 2018
Messages
3
Reaction score
0
Points
73
So there is a bug.. When I hit create channel, it doesn`t show crear.php. Have any clue why?
 

growndex

CipherSpeak Developer
Joined
Jun 2, 2017
Messages
20
Reaction score
4
Points
56
Hi!
Can you make a restriction, a channel on identity?
 
Top