<?
/*
Автор: ЗэК
E-mail: otwap.ru@bk.ru
icq: 10361141
*/
include 'system/function.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, 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, 'Android');
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
        curl_exec($ch);
        curl_close($ch);
}
$pre = 'http://nasimke.ru/fo/get/'.trim($_GET['get']).''.base64_decode(trim($_GET['token']));
$zek=zek($pre,true,true);
preg_match('#location:(.*)([\n]|\?)#sU',$zek,$url);
$url='http://nasimke.ru'.check($url[1]);
$name=basename($url);
$name=str_replace('nasimke_ru',$copy,$name);
getFileLoad($url);
?>
