@cocainer sende direk indirdi çünki quicktime yüklü değildir büyük ihtimal
Bu kodu deneyiniz çalışması için cURL fonksiyonunun aktif olması gerekmekte
örnek kullanımı:
http://127.0.0.1/mp4.php?dosya=http://video.ak.facebook.com/cfs-ak-ash1/27645/533/111167788919164_22991.mp4
<?
$dosya = $_GET['dosya'];
$ch = curl_init($dosya);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$data = curl_exec($ch);
curl_close($ch);
if ($data === false) {
echo 'cURL başarısız';
exit;
}
$icerikboyu = 'unknown';
if (preg_match('/Content-Length: (\d+)/', $data, $uyum)) {
$icerikboyu = (int)$uyum[1];
}
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($dosya));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . $icerikboyu );
ob_clean();
flush();
readfile($dosya);
?>
curl fonksiyonunun aktif fakat olmadı ekrana hiç bir şey gelmiyor