Файл: load/index.php
Строк: 137
<?php
/**
* Эксклюзивные скрипты и шаблоны только на GearNet.ru
* GearNet.ru - Сообщество мастеров!
*/
#Developed by http://gearnet.ru/users/1
define('DIRK', '/dload/'); //папка с скриптом (/papka/), если в корне - ставим слеш /
define('HOME', 'http://' . $_SERVER['HTTP_HOST'] . DIRK);
$COPYRIGHT = 'Arhivka_ru_'; //Префикс в названиях файлов
$text_img = 'Arhivka.RU'; //Текст на картинках
function head()
{
global $res, $tits;
preg_match('#<title>(.*)</title>#Usi', $res, $tits);
$tits[1] = str_replace('| Обменник', 'Загрузки бесплатно', $tits[1]);
$tits[1] = str_replace('Мобильный WAP Файлообменник SASISA', '', $tits[1]);
$tits[1] = preg_replace('#.(.*) #siU', ' скачать ', $tits[1]);
$title = $tits[1];
require '../new/head.php';
}
function foot()
{
echo '<div class="main"><a href="#" onclick="history.back();">Назад</a></a></div>';
echo '<div class="main"><a href="http://arhivka.ru/dload/">В загрузки</a></div>';
require '../new/foot.php';
}
$act = isset($_GET['act']) ? $_GET['act'] : null;
switch ($act)
{
default:
$do = isset($_GET['section_id']) ? $_GET['section_id'] : '';
$files = isset($_GET['files']) ? $_GET['files'] : '';
$sort = isset($_GET['sort']) ? $_GET['sort'] : '';
$page = isset($_GET['start']) ? $_GET['start'] : '';
function getpag($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.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36 OPR/25.0.1614.68');
curl_setopt($curl, CURLINFO_HEADER_OUT, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_REFERER, 'http://onqxg2ltmexhe5i.nblz.ru/fo/');
$res = curl_exec($curl);
curl_close($curl);
return $res;
}
if (!$files)
{
if (!$page)
{
$res = getpag('http://onqxg2ltmexhe5i.nblz.ru/fo/index.php?section_id=' . $do . '&mode=0');
} else
{
$res = getpag('http://onqxg2ltmexhe5i.nblz.ru/fo/index.php?section_id=' . $do . '&mode=0&sort=0&start=' . $page . '');
}
} else
{
$res = getpag('http://onqxg2ltmexhe5i.nblz.ru/fo/info.php?id=' . $files . '');
}
$res = preg_replace('#&sid=.*"#siU', '"', $res);
if (!$files)
{
preg_match('#<div class="item pages">(.*)</div>#Usi', $res, $nav);
$nav = str_replace('/fo/', '', $nav);
$nav = preg_replace("#<br />.*<form.*</form>#siU", '', $nav);
$o = preg_match_all('#<div class="item">.*href="/fo/index.php.*section_id(.*)".*/>(.*)<.*-->.*<b>(.*)</b>#Usi', $res, $out, PREG_SET_ORDER);
if ($o)
{
head();
echo '<div class="title">Бесплатные загрузки</div>';
foreach ($out as $k => $v)
{
echo '<div class="main"><a href="' . HOME . 'index.php?section_id' . $v[1] . '"><img src="../images/ico.png" alt="" />' . $v[2] . '</a><!--(' . strip_tags($v[3]) . ')--></div>';
}
} else
if (preg_match_all('#<div class="item">.*<a class="block"(.*)</div>#Usi', $res, $out, PREG_SET_ORDER))
{
head();
echo '<div class="title">Каталог файлов</div>';
$res = str_replace('src="/fo/images/file_icons', 'src="http://wap.sasisa.ru/fo/images/file_icons', $res);
//$res = str_replace('<img src="http://nashobmen.org.http.s71.wbprx.com/fo/', '<img src="http://nashobmen.org/fo/', $res);
//$res = preg_replace('#src="http://(.*).nashobmen.org.http(.*)jpg#siU', 'src="http://$1.nashobmen.org$2jpg', $res);
$res = str_replace('href="/fo/?files', 'href="http://arhivka.ru/dload/?files', $res);
$res = str_replace('/fo/info.php?id=', '/dload/?files=', $res);
//$res = str_replace('.exe', '', $res);
$res = preg_replace('#<span class="text">.*</span>#siU', '', $res);
preg_match_all('#<div class="item">.*<a class="block"(.*)</div>#Usi', $res, $out, PREG_SET_ORDER);
foreach ($out as $k => $v)
{
$v[1] = '<a ' . $v[1];
echo '<div class="main">' . $v[1] . '</div>';
}
} else
{
head();
echo '<div class="title">Каталог файлов</div>
<script type="text/javascript">
var bntuniqid = 'BjOxKuM5iUniVmQff4w4';
var bntuniqsid = '40516';
var async = 0;
</script>
<script type="text/javascript" src="//dewife.ru/news.js"></script>
';
$res = str_replace('src="/fo/images/file_icons', 'src="http://wap.sasisa.ru/fo/images/file_icons', $res);
$res = str_replace('href="/fo/?files', 'href="http://arhivka.ru/dload/?files', $res);
preg_match_all('#class="fo_image_item">.*href="/fo/info.*id=(.*)".*src="(.*)".*"m">(.*)<#Usi', $res, $out, PREG_SET_ORDER);
foreach ($out as $k => $v)
{
echo '<div class="main"><a href="http://arhivka.ru/dload/?files=' . $v[1] . '"><img src="' . $v[2] . '" alt=" " /></a></div>';
}
}
} else
{
head();
$res = preg_replace('#<span class="text">#siU', '<span class="67text">', $res);
preg_match('#<img style="max-width.*src="(.*)"#Usi', $res, $out_imgs);
$imgs = '<img style="max-width: 100%;" src="' . $out_imgs[1] . '" alt=" " />';
if (!$out[1])
{
preg_match('#<script type="text/javascript">.*file".*"(.*)".*poster".*"(.*)".*</script>#Usi', $res, $out);
$outS = '<video id="my_video_1" class="video-js vjs-default-skin" controls width="320" height="240" preload="none" poster="' . HOME .
'?act=screen&id=' . base64_encode($out[2]) . '" data-setup="{}">
<source src="' . $out[1] . '" type="video/mp4" />
</video>';
}
if (!$out[1])
{
preg_match('#soundFile.*"(.*)"#Usi', $res, $out);
$outS = '<audio preload="none"><source src="' . $out[1] . '"></audio> ';
}
preg_match_all('#<div class="item">.*class="block" href="(.*)".*src="/charts/img.*>(.*)</span>#Usi', $res, $load, PREG_SET_ORDER);
$tits[1] = str_replace('Загрузки бесплатно','',$tits[1]);
echo '<h1 class="title">' . $tits[1] . '</h1>';
if ($out_imgs[1][1])
{
echo '<div class="main">' . $imgs . '</div>';
}
if ($out[1][1])
{
echo '<div class="main">' . $outS . '</div>';
}
echo '<div class="main">Здесь можно скачать ' . $tits[1] . ' бесплатно на свой телефон или смартфон!</div>';
foreach ($load as $k => $v)
{
$v = str_replace('-wap_sasisa_ru','',$v);
echo '<div class="main"><a href="' . HOME . '?act=load&id=' . base64_encode($v[1]) . '">' . $v[2] . '</a></div>';
}
}
if ($nav[1])
{
echo '<div class="adv"><big>' . $nav[1] . '</big></div>'; #навигация
}
foot();
break;
case 'screen':
$id = isset($_GET['id']) ? base64_decode($_GET['id']) : null;
$url = $id;
$img = ImageCreateFromJPEG($url);
$color = imagecolorallocate($img, 99, 184, 255);
$font = 'arial.ttf';
$text = $text_img;
$img_x = imagesx($img);
$img_y = imagesy($img);
$imgx = ($img_x - $img_x) + 5;
$imgy = $img_y - 10;
imagettftext($img, 14, 0, $imgx, $imgy, $color, $font, $text);
imagejpeg($img, $path, 100);
header('Content-Type: image/jpeg');
echo file_get_contents($path);
break;
case 'load':
$url = isset($_GET['id']) ? base64_decode($_GET['id']) : null;
$file = $url;
$url = $url;
$finfo = new SplFileInfo($file);
$fn = $finfo->getFilename();
if ($h = get_headers($url, 1)):
if (!empty($h['Location'])):
$url = $h['Location'];
$h = get_headers($url, 1);
endif;
if (ob_get_level())
ob_end_clean();
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . $COPYRIGHT . $fn);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . $h['Content-Length']);
readfile($file) . exit;
else:
header('location: ' . $file) . exit;
endif;
break;
}
/**
* Эксклюзивные скрипты и шаблоны только на GearNet.ru
* GearNet.ru - Сообщество мастеров!
*/
?>