Loading...
Помощь по скриптам | не работает навигация на грабе
не работает навигация на грабе донор с доек.ком а если через категорию переходит нормально www.ise.worldbyte.net/categ.php
вот сам код
<?php

require_once './config.php';

$url = 'http://m.dojki.com/'.trim($_GET['id']).'';

$cachtime = 86400;

$url2 = md5($url);

$cachfile = 'cache/pages/'.$url2.'';

if(file_exists($cachfile) AND ((time() - filemtime($cachfile)) < $cachtime))

{

$out = file_get_contents($cachfile);

}

else

{

$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://m.dojki.com/');

$res = curl_exec($curl);

curl_close($curl);

preg_match('|<tr>(.*)</tr>|Us', $res, $backs);

str_replace('<a href="2"><img border="0" src="/img/force.gif" width="53" height="51">',' Вперёд',$backs);

$backs = str_replace('<a href="/', '<a href="'.HOME.'index.php?id=', $backs);

$backs[1] = str_replace('<img border="0" src="/img/back.gif" width="53" height="51">', 'Назад-', $backs[1]);

$backs[1] = str_replace('<img border="0" src="/img/force.gif" width="53" height="51">', '-Вперед', $backs[1]);

$out .= ''.DIVnavi.''.$backs[1].'</div>';

preg_match_all('|<div id="thumbs">(.*)<a href="/gal/(.*)"><img src="(.*)<br />(.*)</a>(.*)<div style="clear:both"></div>(.*)<div id="thumbs-time">(.*)</div>(.*)<div id="thumbs-date">(.*)</div>|Us', $res, $down);

$down[3]=str_replace('http://cdn-z3.dojki.com/thumbs/', ''.HOME.'scr3/', $down[3]);

$down[3]=str_replace('http://cdn-z2.dojki.com/thumbs/', ''.HOME.'scr2/', $down[3]);

$down[3]=str_replace('http://cdn-z1.dojki.com/thumbs/', ''.HOME.'scr1/', $down[3]);

$down[3]=str_replace('http://cdn-z4.dojki.com/thumbs/', ''.HOME.'scr4/', $down[3]);

if (!empty($down[1][0]))

{

$count = count($down[1]);

$i = 1;

while ($i < $count)

{

$out .= ''.DIVtitle.''.$down[4][$i].'<a/></div>'.DIVmain.'<img src="'.$down[3][$i].'<a/></div>'.DIV1.'<a href="'.HOME.'download/'.$down[2][$i].'">Смотреть<a/></div><div>'.$down[7][$i].'-'.$down[9][$i].'<a/></div>';

$i++;

}

}

else

{

$out .= 'Пусто';

}

$out .= ''.DIVnavi.''.$backs[1].'</div>';

$out .= '</div>';

$file = fopen($cachfile,'w');

fputs($file, $out);

fclose($file);

}

my_head();

echo $out;

my_foot();

?>
Онлайн: 6
Время:
Gen. 0.064
(c) Bym.Guru 2010-2026