Android - sign in on http page
<p>Create application but i need login to specific serwer.</p>

<p>My problem specification:</p>

<ol>
<li>Must get source page and cookies from first page(method HttpGet). - unsolved</li>
<li>From source page get specific post parametrs. - solved 100%</li>
<li>Using Cookies and post data from first page get source page and new cookies from second page(method HttpPost). - unsolved</li>
<li>Using cookies from second page get third and next source pages(method HttpGet). - unsolved</li>
</ol>

<p>Need using options: </p>

<ul>
<li>referer, </li>
<li>allow redirect.</li>
</ul>

<p>I try get first page on this metod:</p>

<pre><code>List&lt;Cookie&gt; cookies;

protected String Firstpage (String url) {
    StringBuilder Source = new StringBuilder(100000);

     DefaultHttpClient client = new DefaultHttpClient();
     HttpGet httpGet = new HttpGet(url);
     try {
         HttpResponse execute = client.execute(httpGet);
         InputStream content = execute.getEntity().getContent();
         BufferedReader buffer = new BufferedReader(new InputStreamReader(content));
         String x = "";
         while ((x = buffer.readLine()) != null) {
         Source.append(x);
         }
     cookies = client.getCookieStore().getCookies();
     } catch (Exception e) {
         e.printStackTrace();
     }

    return Source.toString();
</code></pre>
