- Jun 9, 2016
- 277
- 111
- 107
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
Code (index.php)
Code (Config):
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
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 © 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(0, 99).']';
// Code Here:
$code = 'R4P3.net/test_code';
$sgid = '';
?>
Last edited: