<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: C#: Send text to a pastebin (HttpWebRequest POST example)</title>
	<atom:link href="http://www.daveamenta.com/2008-05/c-send-text-to-a-pastebin-httpwebrequest-post-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.daveamenta.com/2008-05/c-send-text-to-a-pastebin-httpwebrequest-post-example/</link>
	<description>Indisposable By Default</description>
	<lastBuildDate>Tue, 20 Jul 2010 05:10:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Soroush</title>
		<link>http://www.daveamenta.com/2008-05/c-send-text-to-a-pastebin-httpwebrequest-post-example/comment-page-1/#comment-24</link>
		<dc:creator>Soroush</dc:creator>
		<pubDate>Sat, 24 May 2008 05:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=37#comment-24</guid>
		<description>hey Dave why don&#039;t you answer me?? please...</description>
		<content:encoded><![CDATA[<p>hey Dave why don&#8217;t you answer me?? please&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soroush</title>
		<link>http://www.daveamenta.com/2008-05/c-send-text-to-a-pastebin-httpwebrequest-post-example/comment-page-1/#comment-23</link>
		<dc:creator>Soroush</dc:creator>
		<pubDate>Wed, 21 May 2008 08:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=37#comment-23</guid>
		<description>Thanks for your attention. No it was not me.I still have my previous problem. I think it&#039;s better you to see my code, here it is:
string text = &quot;Soroush&quot;;
            string post = &quot;&amp;parent_pid=&amp;format=text&amp;code2=&quot; 
                + HttpUtility.UrlEncode(text) + &quot;&amp;poster=Soroush&amp;paste=Send&amp;expiry=m&amp;email=&quot;;
            byte[] data = System.Text.Encoding.ASCII.GetBytes(post);            
            try
            {
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(&quot;http://davux.pastebin.com/pastebin.php&quot;);
                
                request.AllowAutoRedirect = false;
                request.Method = &quot;POST&quot;;
                request.ContentType = &quot;application/x-www-form-urlencoded&quot;;
                request.ContentLength = data.Length;
                
                Stream response = request.GetRequestStream();

                response.Write(data, 0, data.Length);
                response.Close();

                HttpWebResponse res = (HttpWebResponse)request.GetResponse();
                res.Close();
                if (res.StatusCode == HttpStatusCode.Found)
                {
                    richTextBox1.Text += res.Headers[&quot;location&quot;];
                }                
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
            }</description>
		<content:encoded><![CDATA[<p>Thanks for your attention. No it was not me.I still have my previous problem. I think it&#8217;s better you to see my code, here it is:<br />
string text = &#8220;Soroush&#8221;;<br />
            string post = &#8220;&amp;parent_pid=&amp;format=text&amp;code2=&#8221;<br />
                + HttpUtility.UrlEncode(text) + &#8220;&amp;poster=Soroush&amp;paste=Send&amp;expiry=m&amp;email=&#8221;;<br />
            byte[] data = System.Text.Encoding.ASCII.GetBytes(post);<br />
            try<br />
            {<br />
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(&#8220;http://davux.pastebin.com/pastebin.php&#8221;);</p>
<p>                request.AllowAutoRedirect = false;<br />
                request.Method = &#8220;POST&#8221;;<br />
                request.ContentType = &#8220;application/x-www-form-urlencoded&#8221;;<br />
                request.ContentLength = data.Length;</p>
<p>                Stream response = request.GetRequestStream();</p>
<p>                response.Write(data, 0, data.Length);<br />
                response.Close();</p>
<p>                HttpWebResponse res = (HttpWebResponse)request.GetResponse();<br />
                res.Close();<br />
                if (res.StatusCode == HttpStatusCode.Found)<br />
                {<br />
                    richTextBox1.Text += res.Headers["location"];<br />
                }<br />
            }<br />
            catch(Exception ex)<br />
            {<br />
                MessageBox.Show(ex.Message);<br />
            }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.daveamenta.com/2008-05/c-send-text-to-a-pastebin-httpwebrequest-post-example/comment-page-1/#comment-22</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sun, 18 May 2008 17:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=37#comment-22</guid>
		<description>Hi Soroush -

Are you getting a URL back in the location field of the header?

I see someone just added something to that bin a few minutes ago, perhaps you got it fixed.</description>
		<content:encoded><![CDATA[<p>Hi Soroush -</p>
<p>Are you getting a URL back in the location field of the header?</p>
<p>I see someone just added something to that bin a few minutes ago, perhaps you got it fixed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soroush</title>
		<link>http://www.daveamenta.com/2008-05/c-send-text-to-a-pastebin-httpwebrequest-post-example/comment-page-1/#comment-21</link>
		<dc:creator>Soroush</dc:creator>
		<pubDate>Sun, 18 May 2008 17:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=37#comment-21</guid>
		<description>Thanks for your nice post.
I write this program as you do. but when i check the site http://davux.pastebin.com/pastebin.php 
i don&#039;t see anything that shows i did this. I mean no post are added to this site... please help me</description>
		<content:encoded><![CDATA[<p>Thanks for your nice post.<br />
I write this program as you do. but when i check the site <a href="http://davux.pastebin.com/pastebin.php" rel="nofollow">http://davux.pastebin.com/pastebin.php</a><br />
i don&#8217;t see anything that shows i did this. I mean no post are added to this site&#8230; please help me</p>
]]></content:encoded>
	</item>
</channel>
</rss>
