Tutorial TS3 Webchannel menager

francisco arsénio

Restricted
Sep 30, 2015
8
1
53
Your script has an error because when I enter the client's name it tells me the name of the bot that is SinusBot instead of saying my I'm trying to see what it is but I have not yet found any solution?...
 

kalle

high minded
Contributor
Oct 28, 2015
411
253
178
Your script has an error because when I enter the client's name it tells me the name of the bot that is SinusBot instead of saying my I'm trying to see what it is but I have not yet found any solution?...
Is this even from my script? I dont get it.
 

growndex

CipherSpeak Developer
Jun 2, 2017
20
4
56
Hello,
What can I do? I tried to change the php version ... and it does not work
1907
 

growndex

CipherSpeak Developer
Jun 2, 2017
20
4
56
Comes the error by only loading the page or if you do somethink
I understand .. thank you for your help.
I have another question .. I have another script to create functional channels .. but i want to make a restriction. I want to make certain groups able to create. For example: command: allow_groups
I will put the source:
Code:
index.php file:
===

<?php session_start(); ?>

<!DOCTYPE html>

<html>

    <head>

    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content="TS3 Create channel" />
    <meta name="author" content="" />
    <link rel="icon" href="/images/ico.jpg" type="jpg/jpg">

    </head>



</html>

<?php



if(!isset($_SESSION['ts3_last_query']))

    $_SESSION['ts3_last_query'] = microtime(true);
session_start();
if($_SESSION['last_session_request'] > TIME() - 5){
    die('<img src="/images/spam.jpg"></img>');
}

$_SESSION['last_session_request'] = TIME();

    date_default_timezone_set('Europe/Bucharest');

    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: 1; url = ./info.php");
        die;
    }

?>



<!DOCTYPE html>

<html lang="en" class="no-js">

    <head>

        <meta charset="UTF-8" />

        <title>Guard | Create channel</title>
       
        <link rel="stylesheet" type="text/css" href="css/main.css" />
        <link rel="stylesheet" type="text/css" href="css/animation.css" />
        <link rel="stylesheet" type="text/css" href="css/growndex1.css" />
        <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>

    <script src='https://www.google.com/recaptcha/api.js'></script>

    </head>

    <body>

        <div class="container">

            <header>
            </header>

            <section>              

                <div id="container_demo" >

                    <div id="wrapper">

                        <div id="login" class="animate form">

                            <form  method="post" autocomplete="off" action="">

                                <h1>CSBD - CREATE CHANNEL</h1>
                                    <div id="form_1" data-animation="bounceIn" class="animated bounceIn">
                                        <div class="form-header">
                                          <i class="fa fa-user"></i>

                                <p>

                                    <label  class="uname" data-icon="u" > Provide all necessary information. <?php  ?></label>
                                    <img src="/images/logo.gif" class="img-rounded"></img>
                                    <input  name="uid" readonly type="text" value="<?php echo $client_nickname; ?>"/>

                                </p>

                                <p>

                                    <label  class="uname" data-icon="u" > Channel Name</label>

                                    <input  value="" name="channelname" required="required" type="text" placeholder="ex. My Channel."/>

                                </p>

                                <p>

                                    <label class="youpasswd" data-icon="p"> Channel Password</label>

                                    <input value="" name="password" required="required" type="password" placeholder="ex. 1234" />

                                </p>

                               

                                <div class="g-recaptcha" data-sitekey="6LcDe5oYWS38bIHrZBmoX1lziJ0-C"></div>

                               

                                <p class="login button">

                                    <input type="submit" name="submit" value="Create" />

                                </p>

                            </form>

                        </div>
    </body>

</html>  



<?php

include 'data/config.php';

$error = 0;

if(isset($_POST['submit']) && !empty($_POST['submit'])) {

    if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])) {

        $secret = $secret_key;

        $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$_POST['g-recaptcha-response']);

        $responseData = json_decode($verifyResponse);

        if($responseData->success) {

            }

        else {

            $error++;

        }

        }

    else {

        $error++;

    }

}

else {

    $errMsg = 'test';

    $succMsg = 'test2';

}



if ($error == 0) {

    if(isset($_POST['submit'])) {

    $channelname = $_POST['channelname'];

    $password = $_POST['password'];

    $unixTime = time();

        $cgid = 16;

    $realTime = date('[Y-m-d]-[H:i]',$unixTime);

        $client->message("[b]Hello, [COLOR=red] $client_nickname [/COLOR]

You have been moved to the channel created through[/B] [b][url][/url]

[COLOR=blue]Accession:[/COLOR]

- Adding operator, admin, JWP.

- Change description, change password.

=========

Channel password:[/b] [b][COLOR=red] $password [/COLOR]

=========

[COLOR=red]Careful:[/COLOR]

The Guard system is in [COLOR=red]BETA[/COLOR] format and major bugs or changes may occur.[/b]");



    try

    {

        $cid1 = $ts3->channelCreate(array(

        "channel_name" => "$channelname",

        "channel_password" => "$password",

        "channel_flag_permanent" => "1",

        "channel_topic" => "Create by Guard",

                "channel_description" => '[center][b][u][COLOR=#00ffff]'.$channelname.'[/u][/b][/center][hr][b][list][*]Date: '.$realTime.'[*]Founder: ' . $client_nickname . '[/list][/b]',

        "cpid" => "$cpid"));



        $ts3->clientGetByUid($clientuid)->setChannelGroup($cid1, $cgid);

        $ts3->clientMove($client_clid, $cid1);



    }

    catch(Exception $e)

    {

        echo "Error (ID " . $e->getCode() . ") <b>" . $e->getMessage() . "</b>";

    }

}

}



else {

    echo "<center>Recaptcha is mandatory!</center>";

}



?>

<footer class="page-footer red darken-4">

          <div class="container">

            <div class="row">

              <div class="col l6 s12">

                <ul class="icons">

                </ul>

              </div>

              <div class="col l4 offset-l2 s12">
          </div>

          <div class="footer-copyright">

            <div class="container">

            <a class="grey-text text-lighten-4 right" href="#top"><i class="fa fa-2x fa-arrow-up"></i></a>

            </div>

          </div>

      </footer>
     
      ====
      CONFIG :
     
      <?php

$HOST_QUERY = "1";

$PORT_QUERY = "10011";

$USER_QUERY = "";

$PASS_QUERY = "";

$SERVER_PORT = "9987";

$NICK_QUERY = "";

$cpid = "";
$secret_key = "6LcDe5oUAAAAAI7YmqvKKoADuT";


?>
 
Last edited:

DemonIQE

New Member
Jul 10, 2019
2
1
15
Hello Can you help me i have a proplem
Fatal error: Call to a member function bind_param() on a non-object in /var/www/html/TS3/index.php on line 220
what's fix


Hello Can you help me i have a proplem
Fatal error: Call to a member function bind_param() on a non-object in /var/www/html/TS3/index.php on line 220
Warning
: mysqli::prepare(): Couldn't fetch mysqli in /var/www/html/TS3/index.php on line 219
what's fix
 
Top