Advertisement
Guest User

Untitled

a guest
Mar 18th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. public string send(string url, string par)
  2. {
  3. String secondStepForm3 = par;
  4. HttpWebRequest request3 = (HttpWebRequest)WebRequest.Create(url);
  5. request3.UserAgent = "Opera/9.80";
  6. request3.Method = "POST";
  7. request3.ContentType = "application/x-www-form-urlencoded";
  8. byte[] EncodedPostParams3 = Encoding.Default.GetBytes(secondStepForm3);
  9. request3.ContentLength = EncodedPostParams3.Length;
  10. request3.GetRequestStream().Write(EncodedPostParams3, 0, EncodedPostParams3.Length);
  11. request3.GetRequestStream().Close();
  12. HttpWebResponse response = (HttpWebResponse)request3.GetResponse();
  13. string lol = new StreamReader(response.GetResponseStream(), Encoding.UTF8).ReadToEnd();
  14. return lol;
  15. }
  16.  
  17. string Auth = send("http://www.studymode.com/login.php","username=assemdos&password=qwerty");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement