<?php
$title = 'Фильмы -  vipzok.tk';
include '../head.php';
include 'config.php';

$curl = curl_init();
curl_setopt($curl,CURLOPT_URL,'http://films.mobik.ru/?'.$_SERVER['QUERY_STRING']);
curl_setopt($curl,CURLOPT_USERAGENT,'Nokia: 5130');
curl_setopt($curl,CURLOPT_TIMEOUT,6);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
$text = curl_exec($curl);
curl_close($curl);
$text=str_replace('href="/','href="index.php?i=',$text);
$text=preg_replace('|<!DOCTYPE(.*?)<img src="img/novelty.pn|si','<div class="hov"><img src="img/novelty.pn',$text);
$text=preg_replace('|<div class="hov"><div class="adv_block">(.*?)</div><br />|si','<div class="hov">',$text);

$text=preg_replace('|<div class="seo">(.*?)</body>|si','',$text);

$text=preg_replace('|>Рецензии</a>(.*?)</div>|si','>Рецензии</a></td>
</tr></table></div><br>',$text);
$text=preg_replace('|<div class="reclama">(.*?)</html>|si','',$text);
$text=preg_replace('|<!DOCTYPE(.*?)<body>|si','',$text);
$text=preg_replace('|<img src="http://mobik.ru/img/poisk.gif(.*?)</html>|si','',$text);

$text=preg_replace('|</div><div style(.*?)<td>|si','<br>',$text);
$text=preg_replace('|<a href="http://mobik.ru/st/(.*?)</div>|si','</div><div class="hov"><br>',$text);
$text=str_replace('href="?mod=file','href="http://films.mobik.ru/?mod=file',$text);
$text=str_replace('href="?mod=soundtracks','href="sound.php?',$text);
$text=str_replace('href="?mod=trailer','href="http://films.mobik.ru/?mod=trailer',$text);
$text=str_replace('Мобик','OTWAP.Ru',$text);
$text=str_replace('<?xml version="1.0" encoding="utf-8"?>','',$text);
$text=str_replace('Скачать','<div class="hov">Скачать',$text);
$text=preg_replace('|</div><div style(.*?)>|si','<br>',$text);
$text=str_replace('Доп. ','<div class="hov">Доп. ',$text);
$text=str_replace('src="http://load.films.mobik.ru/','src="screen.php?id=',$text);

echo $text;

echo '</div>';
include '../foot.php';
?>
