//Encryption and Decryption should be used to protect COOKIES
 //cookie*
 $host = "localhost";
 // Server host name or IP
 //Encryption and Decryption should be used to protect COOKIES
 //cookie*
 $port = $_SESSION["portcon"];
 // Port rcon is listening on
 //Encryption and Decryption should be used to protect COOKIES
 //cookie*
 $password = "******";
 // rcon.password setting set in server.properties
 $timeout = 3;
 // How long to timeout.
 $rcon = new Rcon($host, $port, $password, $timeout);
 if ($rcon->connect()) {
     $rcon->send_command("cp give {$sender} {$amount} hi");
 }
 $APPtotal = $_SESSION['subapp'];
 $UUser = $_COOKIE['UID'];
 //Update the APPPurse in DB
 $connn = mysqli_connect("localhost", "phpmate", "freeagent7", "_datatrap");
 // Check connection
 if (mysqli_connect_errno()) {
     echo "Failed to connect to MySQL: " . mysqli_connect_error();
 } else {
     mysqli_query($connn, "UPDATE members SET points='{$APPtotal}'\nWHERE uid='{$UUser}'");
     echo "Connected";
 }
 unset($_POST['sendto']);
 unset($_POST['cmddo']);