Файл: get.php
Строк: 45
<?php
require_once './config.php';
$url = 'http://faptv.net/site/download/video/'.trim($_GET['id']).'';
if(CFILE == 1) {
$h = get_headers($url,1);
$file = $h['Location'];
if($len = get_headers($file,1)){
if($len[0] == 'HTTP/1.1 200 OK'){
if(ob_get_level()){ob_end_clean();}
if($len['Content-Type'] == 'video/mp4'){$ext='mp4';}
if($len['Content-Type'] == 'video/3gpp'){$ext='3gp';}
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.copyR.'_'.rand(00000,99999).'.'.$ext);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: '.$len['Content-Length']);
readfile($file);
exit;
}
}
}
else{
$h2 = get_headers($url,1);
$files = $h2['Location'];
header('location: '.$files); exit;
}
?>