Файл: down.php
Строк: 37
<?
/*
Автор: ЗэК
E-mail: otwap.ru@bk.ru
icq: 10361141
*/
include 'inc/config.php';
function getFileLoad($url){
global $name;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOTP_REFERER, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_exec($ch);
$res = curl_getinfo($ch);
curl_close($ch);
header('Content-Type: '. $res['content_type']);
header('Content-Length: '. $res['download_content_length']);
header('Content-Disposition: attachment; filename='.$name);
$ch = curl_init($res['url']);
curl_setopt($ch, CURLOPT_USERAGENT, 'Opera mini 4.3');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_exec($ch);
curl_close($ch);
}
$name=htmlspecialchars(trim($_GET['name']));
if (!preg_match('#'.$copy.'_#sU',$name)){
header('Location: /');
exit;
}else{
$name=str_replace($copy.'_','',$name);
$url='http://4ik.tv/files/video_load/'.$_GET['file'].'/'.$name;
$name=$copy.'_'.basename($url);
getFileLoad($url);
}
?>