<title>Картинки</title>
<?php

include'../inc/head.php';
$ch = curl_init("http://pic.sever.ru/dc3.php?".$_SERVER['QUERY_STRING']);
echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"../style/style.css\"/>";
echo '<div class="title">Картинки</div>';

curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: text/html, application/xml, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;', 'Accept-Language: ru, en, *;', 'Accept-Charset: iso-8859-1, utf-8, utf-16, *;', 'Accept-Encoding: identity;', 'Connection: close'));
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['USER_AGENT']);
curl_setopt($ch, CURLOPT_REFERER, 'http://sever.ru/');

$file = curl_exec($ch);

$file=preg_replace('/<?(.*?)<div class="tl">/si','<div class="i">',$file);
$file=preg_replace('/Страниц: <b>([0-9]+)<\/b>(.*?)<\/html>/si','Страниц: <b>$1</b>',$file);
$file=str_replace('dc3.php','view.php',$file);
$file=str_replace('<a href="pic/','<a href="load.php?id=',$file);
$file=str_replace('cache/pic/','screen.php?id=',$file);
$file=str_replace('/img/kv.gif','/design/default/act.gif',$file);
echo $file; curl_close($ch);  include'../inc/foot.php';
echo "</div></body></html>\n";
echo '</div>';

?>
