Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $user = $_POST['user'];
- $pass = $_POST['pass'];
- $response = file_get_contents('http://login.minecraft.net/?user='.$user.'&password='.$pass.'&version=12');
- $values = explode(':', $response);
- if(count($values) > 1)
- {
- $user = $values[2];
- $sessionId = $values[3];
- $response = file_get_contents('http://session.minecraft.net/game/joinserver.jsp?user='.$user.'&sessionId='.$sessionId.'&serverId=1');
- if($response == 'OK')
- {
- $_SESSION['valid'] = 1;
- $_SESSION['redir'] = 'http://snuletek.org/site/mc/mcArch.php';
- echo('
- <script>
- document.location = "http://snuletek.org/site/mc/mcArch.php";
- </script>
- ');
- }
- }
- else
- {
- variableEcho(0, $user, 'Username or password incorrect, or you don\'t own minecraft'); //My function to echo the html form with previously entered values preserved, and in this case, an error message.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement