<?php
header('Content-type: text/html; charset=utf-8');
$ch = curl_init('http://owaps.com/view.php?id='.$_GET['id']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$owaps = curl_exec($ch);
curl_close($ch);
$owaps = str_replace('http://owaps.com">http://owaps.com</a>','http://'.$_SERVER['HTTP_HOST'].'">http://'.$_SERVER['HTTP_HOST'].'</a>',$owaps);
$owaps = preg_replace('|<div class="adv">.*</div>.</div><div class="titl">Навигация</div><div class="dl2">.*</div>|sU','',$owaps);
$owaps = preg_replace('|<div class="titl">Дополнительно</div>.*</div>|sU','',$owaps);
$owaps = str_replace('src="','src="http://owaps.com/',$owaps);
$owaps = preg_replace('|\<a href="komm.php\?id=.*&lid=.*"><div class="a"><strong>Комментарии \[.*\]\<\/strong\>\<\/a\>\<br\>|','',$owaps);
$owaps = preg_replace('|.*<div class="title">Руби закладку owaps.com</div>|sU','',$owaps);
$owaps = str_replace(
array('<div class="menu">','<div class="t_block">','<div class="title2">','<div class="a">','<div class="i_bar_t">'),
array('<div class="tb">','<div class="gt">','<div class="cont">','<div class="cont">','<div class="rek">'),$owaps);
$owaps = str_replace('load.php','down.php',$owaps);
$owaps = preg_replace('|<div class="cont"><div class="b">
<b>Рейтинг файла : .*</b><br>
<img src=".*" alt="" style=".*">\( <a href="view.php\?id.*"><b>\+</b></a>/<a href=".*"><b>-</b></a>\)</div></div>|sU','',$owaps);
$owaps = preg_replace('|<div class="cont"><b>Размер:</b><br/>(.*?)</form></div>|sU','',$owaps);
$owaps = preg_replace('|\<input class=\"enter\" size=\"20\" type=\"text\" value=".*"\/\>|','<input type="text" value="http://'.
$_SERVER['HTTP_HOST'].'/down.php?id='.$_GET['id'].'" />',$owaps);
$owaps = preg_replace('|<div class="cont"><a href="cut.*</div>|','',$owaps);
$owaps = preg_replace('|<div class="cont"><b>Прослушка.*</div>|sU','',$owaps);
$owaps = str_replace('jad.php?','down.php?jad&',$owaps);
$owaps = str_replace('src="http://owaps.com/screen/','src="img.php?img=',$owaps);
$owaps = preg_replace('|<br><a href="tekst.php.*</a>|','',$owaps);
$owaps = str_replace('<div class="rek"><a href="http://owaps.com">На главную</a></div>','',$owaps);
include 'head.php';
echo $owaps;
include 'foot.php';
?>