title: Error retrieving exec() output
body: <p>I'm using exec to grab curl output (I need to use curl as linux command).</p>
  
  <p>When I start my file using php_cli I see a curl output:</p>
  
  <pre><code>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100 75480  100 75480    0     0  55411      0  0:00:01  0:00:01 --:--:-- 60432
  </code></pre>
  
  <p>It means that all the file has been downloaded correctly (~ 75 KB).</p>
  
  <p>I have this code:</p>
  
  <pre><code>$page = exec('curl http://www.example.com/test.html');
  </code></pre>
  
  <p>I get a really strange output, I only get: <code>&lt;/html&gt;</code></p>
  
  <p>(that's the end of my <strong>test.html</strong> file)</p>
  
  <p>I really do not understand the reason, CURL seems to download all the file, but in $page I only get 7 characters (the lastest 7 characters).</p>
  
  <p>Why?</p>
  
  <p>P.S. I know I can download the source code using other php functions, but I must to use curl (as linux command).</p>