<?php
include 'sys/head.php';
require_once "simple_html_dom.php";
function curl_get($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_USERAGENT,'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.2.15 Version/10.10');
curl_setopt($curl, CURLOPT_REFERER, "http://www.google.com/bot.html");
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, ['X-Requested-With: XMLHttpRequest']);
$cnt = curl_exec($curl);
curl_close($curl);
return $cnt;
}
$file = curl_get("https://www.kinomania.ru/news".$_GET['$id']);
##########################################
$file=str_replace('<?xml version="1.0" encoding="utf-8"?>','',$file);
//$file=preg_replace('|<!DOCTYPE(.*?)</div>|is','',$file);
$file=str_replace('<div class="cover js-b-lazy fadeIn animated" style="background-image: url(/theme/img/', '<div class="cover js-b-lazy fadeIn animated" style="background-image: url(https://kinso.ru/theme/img/', $file);
$file=str_replace('<div class="gb"> <a href="?id=all">На главную</a> </div>', '', $file);
$file=str_replace('<link rel="stylesheet" href="//fs.kinomania.ru/app/css/min.css?v=1.0.3">','', $file);
$file=str_replace('<div class="banner">','</div></div></div>', $file);
$file=str_replace('<div style="text-align: center">','</div></div></div>', $file);
$file=str_replace('<div style="display: inline-block">','</div></div>', $file);
$file=str_replace('href="/news/','href="/?id=', $file);
$file = str_replace(':0" data-original="//', '', $file);
$file=preg_replace('|<div class="tags news-tags">(.*?)</html>|is','',$file);
$file=preg_replace('|<div class="footer">(.*?)<!-- bxSlider Javascript file -->|is','',$file);
$file=preg_replace('|<div class="outer-social clear">(.*?)</div>|is','',$file);
$file=preg_replace('|<div class="outer">(.*?)</header>|is','',$file);
$file=preg_replace('|<aside(.*?)</aside>|is','',$file);
$file=str_replace('<?xml version="1.0" encoding="UTF-8"?>','', $file);
$file=str_replace('<div class="gb"> </div>', '', $file);
//$file=str_replace('<div> </div>', '', $file);
$file=str_replace('<div class="gd"></div>', '', $file);
$file=str_replace('<div class="s"> </div>', '', $file);
$file=str_replace('<div class="gd"></div>', '', $file);
$file=str_replace('<div class="hdr"><img src="/res/hdr.png" alt="WEP.RU"/></div>', '', $file);
$file=str_replace(' <div class="bdc"><strong>Бесплатное видео</strong></div> <div class="gb"> ТВ-проекты: </div>', '', $file);
$file=str_replace('<div class="gbf"></div>', '', $file);
$file=str_replace('<a href="https://m.anwap.love/enter">Вход</a> |<a href="https://m.anwap.love/reg">Регистрация</a>','', $file);
$file=str_replace('<div class="zag2">','', $file);
$file=str_replace('<div class="save">','', $file);
$file = preg_replace('#btcop(.*?)</div>#su','',$file);
$file = preg_replace('#sfc(.*?)</div>#su','',$file);
$file = preg_replace('#<span id="navbarName(.*?)</span>#su','',$file);
##########################################
echo $file;
include 'sys/foot.php';