Файл: 112/index.php
Строк: 17
<?php
include 'head.php';
function view($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1');
curl_setopt($curl, CURLINFO_HEADER_OUT, false);
curl_setopt($curl, CURLOPT_REFERER, "http://bymas.ru/downloads/0");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 60);
$result = curl_exec($curl);
curl_close($curl);
if (!$result){
echo '<div class="menu">
Ошибка, мы уже работаем над её устранением...
</div>';
}
return $result;
}
$max = $_GET['max'];
$file=view('http://bymas.ru/downloads/0/'.(!empty($max) ? $max : ''));
$file=str_replace('href="http://bymas.ru/downloads/','href="down.php?max=',$file);
$file=preg_replace('|<!DOCTYPE(.*?)<div class="menu">|si','',$file);
$file=preg_replace('|<div class="menu2">(.*?)</html>|si','',$file);
$file=preg_replace('|<div class="title">(.*?)<div class="menu">|si','',$file);
$file=preg_replace('|<?xml(.*?)<a class|si','<a class',$file);
$file=str_replace('<?','</a>',$file);
$file=str_replace('href="down.php?max=list_files.php?','href="ses.php?',$file);
$file=str_replace('src="/views/default/img/','src="',$file);
echo $file;
include 'foot.php';
?>