title: File_get_contents() not working when the get url redirects
body: <p>The function I am using is:</p>
  
  <pre><code>function http_post ($url, $data)
  {
  $data_url = http_build_query ($data);
  $data_len = strlen ($data_url);
  date_default_timezone_set('America/New_York');
  
  return array ('content'=&gt;file_get_contents ($url, false
      , stream_context_create (array ('http'=&gt;array (
      'method'=&gt;'GET', 
      'header'=&gt;"Connection: close\r\nContent-Length: $data_len\r\nContent-type: application/x-www-form-urlencoded\r\n", 
      'content'=&gt;$data_url
      )))), 
      'headers'=&gt;$http_response_header
      );
  }
  </code></pre>
  
  <p>And the call is:</p>
  
  <pre><code>http_post('http://www.wunderground.com/cgi-bin/findweather/getForecast/', array('airportorwmo'=&gt;'query','historytype'=&gt;'DailyHistory','backurl'=&gt;"/history/index.html",'code'=&gt;"$myCode",'month'=&gt;"$myMonth",'day'=&gt;"$myDay",'year'=&gt;"$myYear"));
  </code></pre>
  
  <p>The original form is located on the following page, but I'm using the form's action page in the call:</p>
  
  <pre><code>wunderground.com/history/
  </code></pre>
  
  <p>Ultimately I want to get contents from the redirected page, which is for example:</p>
  
  <pre><code>http://www.wunderground.com/history/airport/CWTA/2013/1/24/DailyHistory.html?req_city=McTavish&amp;req_state=QC&amp;req_statename=Quebec&amp;MR=1
  </code></pre>
  
  <p>However as above, the form takes different elements, i.e. code, month, day, year.  </p>