Redeem Bot

Discussion in 'Web scripts' started by Special, Jan 2, 2017.

  1. Special

    Special Contributing Member

    Hello All, I'm made a bot.
    That's got requested By @xCHeF
    Functions:
    When you put a code (In config) Like XXXX-XXXX-XXXX-XXXX
    When he type the code On the website got a rank.
    If wrong code type wrong tries again.
    Requirements: Teamspeak3 PHP Framework Search for it :D

    Code (index.php)
    PHP:
    <?PHP

    require_once("libraries/TeamSpeak3/TeamSpeak3.php");
    include_once(
    "config.php");
    //This code for get his own information
    $botname_info '[R4P3]Info';
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://".$YATQA_username.":".$YATQA_password."@".$server_ip.":".$YATQA_queryport."/?server_port=".$server_port."&nickname=".$botname_info."");
    foreach(
    $ts3_VirtualServer->clientList() as $ts3_client) {

    if(
    $_SERVER['REMOTE_ADDR'] == $ts3_client['connection_client_ip']) {
    $nicknames[] = $ts3_client["client_nickname"];
    $nickname $ts3_client["client_nickname"];
    $dbid $ts3_client["client_database_id"];
    $clid $ts3_client["clid"];
    $uid $ts3_client["client_unique_identifier"];

    }
    }
    if (isset(
    $_POST['submit'])) {
        
    $redeem_1 $_POST['redeemcode'];
    if (
    $redeem_1 == $code) {
            
    //Type what do you want to say to him when he correctly type the code *In website*
            
    echo '<center><strong>correctly</strong></center>';
            
    //Here Type the commands your want, If he correctly type the code, As do you want I just make a command to give Him a group :D
            
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://".$YATQA_username.":".$YATQA_password."@".$server_ip.":".$YATQA_queryport."/?server_port=".$server_port."&nickname=".$botname."");
            
    $ts3_VirtualServer->clientGetByUid("$uid")->addServerGroup($sgid);
            die;
      }else{
          
    //Here type what do you want to say to him when he wrong :D
          
    echo '<center><strong>Wrong/try Again</strong></center>';
            
    header("Refresh:3; url=code.php");
      }
    }



    ?>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Redeem-Page</title>
    <link href="bootstrap.min.css" rel="stylesheet">
    </head>
    <body>
    <form method="POST">
            <center>
    <h1 style="
        font-size: 50px;
    ">Redeem Bot</h1>
                <label for="redeemcode">Code:</label>
                <input type="text" id="redeemcode" name="redeemcode">
         
                <div class="row push-15-t">
                </div><br><br>
                <input type="submit" value="Active The code" name = "submit">
            </form><br><br><br>
            <p>2017 &copy; Professional Developer's Team @Special </p>

    </body>
    </html>



    </body>
    Code (Config):

    PHP:
    <?php

    #   ____             __ _    
    #  / ___|___  _ __  / _(_) __ _
    # | |   / _ \| '_ \| |_| |/ _` |
    # | |__| (_) | | | |  _| | (_| |
    #  \____\___/|_| |_|_| |_|\__, |
    #                         |___/
    // Info
    $YATQA_username '';
    $YATQA_password '';
    $YATQA_queryport '';
    $server_ip '';
    $server_port '';
    $botname 'Redeem%20Bot%20['mt_rand(099).']';
    // Code Here:
    $code 'R4P3.net/test_code';
    $sgid '';





    ?>
     
    Last edited: Jan 4, 2017
    Umar, Rocketrix, Ra33 and 3 others like this.
  2. 6lal

    6lal New Member

    Nice bot, Keep going on special
     
  3. Ridicc

    Ridicc Super Mod

    It would make more sense to implement a database that holds all possible keys. It should mark a key as used as soon as somebody used it since you could just share the key with your friends in the current script.
     
    Kleberstoff and Special like this.
  4. Special

    Special Contributing Member

    @Ridicc I know, I'm busy because I have exam's/ I do not have time to make or editing, If you want to make it and sharing to people You can.
    Anyway thank you for your reply :D
     
    Umar likes this.
  5. iiOne

    iiOne Member

    Amazing ♥
     
  6. Cepkin

    Cepkin Member

  7. hiimmartyna

    hiimmartyna New Member

  8. Special

    Special Contributing Member

    @Cepkin I just do when he put the code Got a group, You must add a group id on config (sgid)
     
  9. Cepkin

    Cepkin Member

  10. Special

    Special Contributing Member

    Edit header refresh @Cepkin index.php, I just put My file name is code because my file name is code.php, Just change it
     
  11. IIMrAli512

    IIMrAli512 New Member

    Nice bot, Keep going man with your amazing bots.
     
  12. Nicer

    Nicer Contributing Member

    I may take a look and make enhanced version of this :)
     
    Special, iiOne and 0x0539 like this.
  13. iiOne

    iiOne Member

    <3
     
  14. Special

    Special Contributing Member

  15. Pain

    Pain VIP

    i dont't understand what does these bot, can someone pls explain it to me ? ty
     
  16. Special

    Special Contributing Member

    @Pain That's mean redeembot First you put a code on config.php, When the users put the code (you put Him on config.php) Get group on teamspeak3, Like *VIP* etc.
     
  17. Ruinous

    Ruinous Member

    Please Upload With Files
     
  18. LetsBlade

    LetsBlade New Member

    lol. For that you dont need files :D just make a index.php and a config.php and upload it to your webserver
    (and edit the configs etc)
     
  19. Special

    Special Contributing Member

  20. LetsBlade

    LetsBlade New Member

    hupps^^
     

Share This Page