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.
<?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 => $url,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_BINARYTRANSFER => 1,
CURLOPT_BUFFERSIZE => 102400
);
curl_setopt_array($ch,$a_opt);
$str=curl_exec($ch);
$f=fopen('/tmp/debian.iso','w');
fwrite($f,$str)
?>
Maybe there are some bugs in it,but no error ouput,i can't download the target iso file,how to fix it?