<?php

 //============
// Author: BoXo (Guccifer)
// E-Mail: guccifer@inbox.ru
// Tel.: +998935193246
// Site: Zagruz.Org
// Grabberlash yoki Parserlash kerakmi? Unda bizga murojaat qiling! A`loqa yuqorida keltirilgan.
//============
 


define('_IN_JOHNCMS', 1);
require_once ('../incfiles/core.php');

$i = $_GET['i'];
$url = 'http://quvnoq.com/yangiliklar/'.(!empty($i) ? $i : '').'';
$out = '';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, UA);
curl_setopt($curl, CURLINFO_HEADER_OUT, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_REFERER, 'http://quvnoq.com/');
$res = curl_exec($curl);
curl_close($curl);

 preg_match_all('|<div class="phdr">(.*)</div><div class="menu">(.*)</div>|Us', $res, $down);
$down[2]=preg_replace('#<script(.*)</script>#sU','',$down[2]);
if (!empty($down[1][0]))
{
$count = count($down[1]);
$i = 0;
while ($i < $count)
{
$out .= '<div class="phdr">'.$down[1][$i].'</div><div class="menu">'.$down[2][$i].'  — deya xabar beradi <a href="http://daryo.uz">Daryo</a> nashri. </div></div></div>';

$i++;
}
}
else
{
$out .= 'Пусто';
}
 preg_match('|<div class="phdr"><b>(.*)</b></div>|Us', $res, $title); 
$textl = $title[1];
require_once ('../incfiles/head.php'); 
 echo '<div class="menu">« <a href="'.$home.'/yangiliklar/">Yangiliklarga qaytish</a></div>';
 
 echo $out;


if ($user_id){

}
 echo '<div class="menu">« <a href="'.$home.'/yangiliklar/">Yangiliklarga qaytish</a></div>';
 
echo '<div class="menu"><b>Do\'stlarni ham taklif qiling:</b><br/><script type="text/javascript" src="//yastatic.net/share/share.js" charset="utf-8"></script><div class="yashare-auto-init" data-yashareL10n="ru" data-yashareType="small" data-yashareQuickServices="odnoklassniki,vkontakte,facebook,moimir,gplus" data-yashareTheme="counter"></div></div>';
include '../incfiles/end.php';
?>