title: keep session alive using webclient
body: <p>I'm trying to program an application connecting to a website not spammer but some thing like that .</p>
  
  <p>But there is one problem :</p>
  
  <p>In that website you will login by an html form and I know the target php page and parameters so with c# I login like this :</p>
  
  <pre><code>using (WebClient wc = new WebClient())
  {
      wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-urlencoded";
      wc.UploadString("http://example.com/login/check.php", "username=US&amp;password=PW");
      MessageBox.Show(result);
  }
  </code></pre>
  
  <p>after logining in when I want to ( for example ) send a post ( like codes below ) the answer is that you are not loged in !</p>
  
  <pre><code>using (WebClient wc = new WebClient())
  {
      wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-urlencoded";
      wc.UploadString("http://example.com/post/send.php", "title=T&amp;body=B");
      MessageBox.Show(result);
  }
  </code></pre>
  
  <p>I think the problem is that the session is closed .
  what can I do ?</p>