title: Write big file from web into local directory with CURLOPT_BUFFERSIZE
body: <p>There is a big iso file on the web from which i want to write it into my local directory with CURLOPT_BUFFERSIZE  as 102400 bytes,so i wrote the following code to do the job.</p>
  
  <pre><code>&lt;?php
  $url="http://gensho.acc.umu.se/debian-cd/8.0.0/i386/iso-cd/debian-8.0.0-i386-lxde-CD-1.iso";
  $ch=curl_init();
  $a_opt=array(
              CURLOPT_URL =&gt; $url,
              CURLOPT_HEADER =&gt; 0,
              CURLOPT_RETURNTRANSFER =&gt; 1,
              CURLOPT_BINARYTRANSFER =&gt; 1,
              CURLOPT_BUFFERSIZE =&gt; 102400
          );
  curl_setopt_array($ch,$a_opt);
  $str=curl_exec($ch);
  $f=fopen('/tmp/debian.iso','w');
  fwrite($f,$str)
  ?&gt;
  </code></pre>
  
  <p>Maybe there are some bugs in it,but no error ouput,i can't download the target iso file,how to fix it? </p>