<?php
error_reporting(0);
$title='XXX Загрузки';
include '../inc/head.php';
echo '<div class="title">ХХХ загрузки</div>';
$ctime = 86400;
$cfile = '../cache/'.md5($_SERVER['REQUEST_URI']);
if(file_exists($cfile)){
if((time() - filemtime($cfile)) < $ctime){
echo file_get_contents($cfile);
exit;
}}
ob_start();
$url = 'http://naxxx.ru/down/view.php?'.$_SERVER['QUERY_STRING'];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_USERAGENT,'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.2.15 Version/10.10');
curl_setopt($curl, CURLOPT_REFERER, "http://naxxx.ru");
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
$file = curl_exec($curl);
curl_close($curl);
include './sys.php';
echo $file;
$buffer = ob_get_contents();
ob_end_clean();
file_put_contents($cfile, $buffer);
echo $buffer;
include '../inc/foot.php';
?>