Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpWebRequest request = (HttpWebRequest)
- WebRequest.Create("http://junt.pastebin.com/pastebin.php");
- request.AllowAutoRedirect = false;
- request.Method = "POST";
- string post = "&parent_pid=&format=" + lstLanguages.SelectedText + "&code2=" + HttpUtility.UrlEncode(txtPaste.Text) + "&poster=Dave&paste=Send&expiry=m&email=";
- byte[] data = System.Text.Encoding.ASCII.GetBytes(post);
- request.ContentType = "application/x-www-form-urlencoded";
- request.ContentLength = data.Length;
- Stream response = request.GetRequestStream();
- response.Write(data, 0, data.Length);
- response.Close();
- HttpWebResponse res = (HttpWebResponse)request.GetResponse();
- res.Close();
- // note that there is no need to hook up a StreamReader and
- // look at the response data, since it is of no need
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement