title: Warning: file_get_contents: failed to open stream: Redirection limit reached, aborting
body: <p>I read over 20 related questions on this site, searched in Google but no use. I'm new to PHP and am using PHP Simple HTML DOM Parser to fetch a URL. While this script works with local test pages, it just won't work with the URL that I need the script for. </p>
  
  <p>Here is the code that I wrote for this, following an example file that came with the PHP Simple DOM parser library:</p>
  
  <pre><code>&lt;?php
  
  include('simple_html_dom.php');
  
  $html = file_get_html('http://www.farmersagent.com/Results.aspx?isa=1&amp;name=A&amp;csz=AL');
  
  foreach($html-&gt;find('li.name ul#generalListing') as $e)
  echo $e-&gt;plaintext;  
  
  ?&gt;
  </code></pre>
  
  <p>And this is the error message that I get:</p>
  
  <pre><code>Warning: file_get_contents(http://www.farmersagent.com/Results.aspx?isa=1&amp;amp;name=A&amp;amp;csz=AL) [function.file-get-contents]: failed to open stream: Redirection limit reached, aborting in /home/content/html/website.in/test/simple_html_dom.php on line 70
  </code></pre>
  
  <p>Please guide me what should be done to make it work. I'm new so please suggest a way that is simple. While reading other questions and their answers on this site, I tried cURL method to create a handle but I failed to make it work. The cURL method that I tried keeps returning "Resources" or "Objects". I don't know how to pass that to Simple HTML DOM Parser to make $html->find() work properly.</p>
  
  <p>Please help!
  Thanks!</p>