Advertisement
Guest User

Minecraft Login

a guest
Feb 11th, 2012
2,221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. string strUsername, strPassword, strSource;
  2.             strUsername = txtUsername.Text;
  3.             strPassword = txtPassword.Text;
  4.  
  5.             WebClient wClient = new WebClient();
  6.  
  7.             if ((strUsername != String.Empty) && (strUsername != String.Empty))
  8.             {
  9.                 strSource = wClient.DownloadString("http://login.minecraft.net/?user=" + strUsername + "&password=" + strPassword + "&version=13");
  10.                 string[] splitUsername = new String[] { ":" };
  11.                 string[] newSource = strSource.Split(splitUsername, StringSplitOptions.None);
  12.  
  13.                 if (newSource[2] == strUsername)
  14.                 {
  15.                     MessageBox.Show("Login Successfully!");
  16.                 }
  17.                 else
  18.                 {
  19.                     MessageBox.Show("Bad Login!");
  20.                 }
  21.             }
  22.             else
  23.             {
  24.                 MessageBox.Show("Please fill out these two textboxes first.");
  25.                 Application.Exit();
  26.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement