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

.
Screamer

~XeOn~, на твой пост (22.11.2012 / 22:18) отвечу, Так на мой взгляд попроще, меньше писанины

define ('SYSTEM', TRUE);
define ('_IN_JOHNCMS', TRUE);

if(file_exists(CACHE)) {
$content = file_get_contents(CACHE); 
} else {
$strtr = array('href="/down' => 'href="' . DIR);
$replaces = array(
 '#<\?xml.*?class="phdr">#s' => '<div class="phdr">',
 '#<table class="tmn".*</html>#s' => ''
);
$content = getContent(URL);
$content = preg_replace(array_keys($replaces), array_values($replaces), $content);
$content = strtr($content, $strtr);
file_put_contents(CACHE, $content);
}

require 'includes/core.php';
$rootpath = $_SERVER['DOCUMENT_ROOT'] . '/';
require $rootpath . 'incfiles/core.php';
$headmod = substr(CACHE, 0, 7);
$textl = 'Качай бесплатно';
require $rootpath . 'incfiles/head.php';
echo $content;
require $rootpath . 'incfiles/end.php';

--
А куда табы подевались?