Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- textBox3.Clear();
- string user = textBox1.Text;
- string pass = textBox2.Text;
- ASCIIEncoding encoding = new ASCIIEncoding();
- string postUser = "user=" + user;
- string postPass = "pass=" + pass;
- byte[] Binduser = encoding.GetBytes(postUser);
- byte[] Bindpass = encoding.GetBytes(postPass);
- WebRequest requestUser = WebRequest.Create("http://xcoreproject.eu/validate-2.php");
- requestUser.Method = "POST";
- requestUser.ContentType = "application/x-www-form-urlencoded";
- requestUser.ContentLength = Binduser.Length;
- Stream stream = requestUser.GetRequestStream();
- stream.Write(Binduser, 0, Binduser.Length);
- stream.Close();
- WebResponse response = requestUser.GetResponse();
- stream = response.GetResponseStream();
- StreamReader sr = new StreamReader(stream);
- textBox3.Text = sr.ReadToEnd();
- sr.Close();
- stream.Close();
- WebRequest requestpass = WebRequest.Create("http://xcoreproject.eu/validate-2.php");
- requestpass.Method = "POST";
- requestpass.ContentType = "application/x-www-form-urlencoded";
- requestpass.ContentLength = Bindpass.Length;
- Stream streampass = requestpass.GetRequestStream();
- streampass.Write(Bindpass, 0, Bindpass.Length);
- streampass.Close();
- WebResponse responsepass = requestpass.GetResponse();
- streampass = responsepass.GetResponseStream();
- StreamReader srpass = new StreamReader(streampass);
- textBox5.Text = srpass.ReadToEnd();
- srpass.Close();
- streampass.Close();
- }
- catch (Exception ex)
- {
- MessageBox.Show("Error : " + ex.Message);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement