title: HTTP POST and RESPONSE specific case study
body: <ol>
  <li>Site: <a href="http://na.leagueoflegends.com/ladders/solo-5x5" rel="nofollow">http://na.leagueoflegends.com/ladders/solo-5x5</a></li>
  <li>Search for a a player (example: Jaiybe)</li>
  <li>You get redirected (in this case to: <a href="http://na.leagueoflegends.com/ladders/solo-5x5?highlight=28&amp;page=1" rel="nofollow">http://na.leagueoflegends.com/ladders/solo-5x5?highlight=28&amp;page=1</a>)</li>
  <li>Read the content</li>
  </ol>
  
  <p>And I want to do that in java/android.</p>
  
  <ol>
  <li><p>I analyze the sites POST request when searching, result:</p>
  
  <ul>
  <li>op:Search    </li>
  <li>player:Jaiybe   </li>
  <li>ladder_id:3       </li>
  <li>form_build_id:form-fff5e6e2569f1e15e5a5caf2a61c15e2       </li>
  <li>form_id:ladders_filter_form</li>
  </ul></li>
  <li><p>Build a simple HTTP POST mixture and lets read the content...</p></li>
  </ol>
  
  <p>The CODE:</p>
  
  <pre><code>HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost("http://na.leagueoflegends.com/ladders/solo-5x5");
  
  // Add your POST METHOD attributes
  List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
  nameValuePairs.add(new BasicNameValuePair("op", "Search"));
  nameValuePairs.add(new BasicNameValuePair("player", Jaiybe));
  nameValuePairs.add(new BasicNameValuePair("ladder_id", "3"));
  nameValuePairs.add(new BasicNameValuePair("form_build_id","form-daca6fff89cedc352ccc3f533afa3804"));
  nameValuePairs.add(new BasicNameValuePair("form_id","ladders_filter_form"));
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  
  // Execute HTTP Post Request
  HttpResponse response = httpclient.execute(httppost);
  responseBody = EntityUtils.toString(response.getEntity());
  return responseBody;
  </code></pre>
  
  <p>And when I run it - I get so some kind of a offline page...</p>
  
  <p>The number form_build_id - is constantly changing, but this was no problem, to use still the same one, and also If I would like to "test" if this could be the problem, I have no Idea how would I...</p>
  
  <p>OR: Is there any other - FAST - way how to get same results? </p>
  
  <p>What is strange is that the "error" site source code that I get on android is different as if I run the same on my PC (Win7, Eclipse, Java) or in my browser. As if there would be two versions of offline sites - for mobile and for PC - but my question: HOW WOULD the server know that the code runs on a Android device? Is there a way how to set this up in HttpClient?</p>