Просмотр поста

.
Bahakz
код граббера (+/-)
<?php
define('_IN_JOHNCMS', 1);
$textl = 'Загрузки для Андроид';
require_once ("../incfiles/core.php");
require_once ("../incfiles/head.php");

header("Content-type:text/html; charset=utf-8");

$id = $_GET['id'];

$file = file_get_contents('http://gegas.net/android/'
. (!empty($id) ? $id : ''));
$file = preg_replace('|<!DOCTYPE(.*?)<section id="content">|si', '', $file);
$file = str_replace('<section>', '', $file);
$file = str_replace('</section>', '', $file);
$file = preg_replace('|<li><a href="/">На главную</a>(.*)</html>|si', '', $file);
$file = str_replace('<a class="button"', '<a class="bmenu"', $file);
$file = str_replace('<li>', '<div class="menu">', $file);
$file = str_replace('</li>', '</div>', $file);
$file = str_replace('<h2>', '<div class="phdr">', $file);
$file = str_replace('</h2>', '</div>', $file);
$file = str_replace('<ul>', '', $file);
$file = str_replace('</ul>', '', $file);
$file = str_replace('<aside>', '', $file);
$file = str_replace('</aside>', '', $file);
$file = str_replace('<a href="http://gegas.net/android/downloads/directory/', '<a href="' . $set['homeurl'] . '/android/?id=downloads/directory/', $file);
$file = str_replace('href="http://gegas.net/android/downloads/top', 'href="' . $set['homeurl'] . '/android/?id=downloads/top', $file);
$file = str_replace('href="http://gegas.net/android/downloads/news', 'href="' . $set['homeurl'] . '/android/?id=downloads/news', $file);
$file = str_replace('href="http://gegas.net/android/downloads/search', 'href="' . $set['homeurl'] . '/android/?id=downloads/search', $file);
$file = str_replace('href="http://gegas.net/android/downloads/object', 'href="' . $set['homeurl'] . '/android/?id=downloads/object', $file);
$file = str_replace('<h2 class="title_search">', '<div class="phdr">', $file);
$file = str_replace('<form action="http://gegas.net/android/downloads/search', '<form action="' . $set['homeurl'] . '/android/?id=downloads/search', $file);
$file = str_replace('href="http://gegas.net/android', 'href="' . $set['homeurl'] . '/android', $file);
echo $file;
require("../incfiles/end.php");
?>