Advertisement
cgrunwald

Untitled

Oct 29th, 2010
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1.  
  2.                 HttpWebRequest request = (HttpWebRequest)
  3.                 WebRequest.Create("http://junt.pastebin.com/pastebin.php");
  4.  
  5.                 request.AllowAutoRedirect = false;
  6.                 request.Method = "POST";
  7.  
  8.                 string post = "&parent_pid=&format=" + lstLanguages.SelectedText + "&code2=" + HttpUtility.UrlEncode(txtPaste.Text) + "&poster=Dave&paste=Send&expiry=m&email=";
  9.                
  10.                 byte[] data = System.Text.Encoding.ASCII.GetBytes(post);
  11.  
  12.                 request.ContentType = "application/x-www-form-urlencoded";
  13.                 request.ContentLength = data.Length;
  14.  
  15.                 Stream response = request.GetRequestStream();
  16.  
  17.                 response.Write(data, 0, data.Length);
  18.  
  19.                 response.Close();
  20.  
  21.                 HttpWebResponse res = (HttpWebResponse)request.GetResponse();
  22.                 res.Close();
  23.                 // note that there is no need to hook up a StreamReader and
  24.                 // look at the response data, since it is of no need
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement