BukkitMesseger Register

Username:

Password:

Confirm Password:

Security-Code:

"; $username = $_POST['username']; $password = $_POST['password']; $password2 = $_POST['password2']; $code = $_POST['code']; $sendString = "register&splitOpcode;requestSendedByPHP&splitNormal;" . $username . "&splitNormal;" . $password . "&splitNormal;" . $code . "&splitOpcode;"; if(strlen($password)>0){ if ($password == $password2) { error_reporting(0); $service_port = 1234; $address = gethostbyname('localhost'); $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $result = socket_connect($socket, $address, $service_port); if ($result === false) { echo "No connection!
"; } else { $out = ''; socket_write($socket, $sendString, strlen($sendString)); $out = socket_read($socket, 2048); list($Opcode, $answer, $r) = split("&splitOpcode;", $out); socket_close($socket); echo $answer . "
"; if($answer == "finished"){ echo "Successfully registered"; }else if($answer == "codeWrong"){ echo "The security code is wrong"; }else if($answer == "codeNull"){ echo "Get your security code in minecraft first
Usage: /bm register"; }else if($answer == "alreadyRegistered"){ echo "You are already registered"; } } }else { echo "Passwords doesn't match!"; } }else { echo "Please insert a password!"; } } ?>