For some reason when I use my php script to download files via curl it keeps just giving up after a few bytes have been downloaded whereas it was working fine a few weeks ago. The curl error is: transfer closed with xxx bytes remaining to read
Ben localhost Bu koşuyorum ama benim sunucuda çalışıyor, ben de apache yeniden başlatmayı denedim ama hiçbir başarı ettik. Bu Birisi lütfen bana yardımcı olabilir, ben kullanıyorum kodudur? Şimdiden teşekkürler :)
$fh = fopen("files/" . $title . "/" . $name, "w");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, trim($url));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_FILE, $fh);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)");
curl_exec($ch);
echo curl_error($ch);
curl_close($ch);
chmod("files/" . $title . "/" . $name, 0777);