Hi,
I am download a avi file to server, script working fine in window xp with xxamp and download file and this file run good.
But when i run this script in win server 2003 under iis 6 its work same and download a avi file but this file not running in any movi players its appear bad format.
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$search_url);
curl_setopt($ch,CURLOPT_USERPWD,"$user:$pass");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_HEADER,1);
$content = curl_exec($ch);
curl_close($ch);
$myFile = $vd_name;
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $content);
fclose($fh);
i think its need header information how can i add header information for this avi. Note i am not force downloading to browser i am saving this file on server end.