
27.04.2010, 14:09
|
|
Banned
Регистрация: 06.12.2009
Сообщений: 47
Провел на форуме: 191390
Репутация:
74
|
|
RexTiam,
PHP код:
<html>
<body bgcolor=#1A1A1A text=#006699>
<?php
$conf = array(
'from' => $from,
'to' => $to
);
$conf['from'] = "25220";
$conf['to'] = "25231";
function parse($from, $to, $where)
{
preg_match('|'.$from.'(.*)'.$to.'|mi', $where, $out);
$out = $out[0];
$out = str_replace($from,"",$out);
$out = str_replace($to,"",$out);
return $out;
}
for ($i=$conf['from'];$i<=$conf['to'];$i++)
{
$fp = fsockopen('world-art.ru', 80);
$id = $i;
$headers = "GET /cinema/cinema.php?id=".$id." HTTP/1.1\r\n";
$headers .= "Host: www.world-art.ru\r\n";
$headers .= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9\r\n";
$headers .= "Connection: close\r\n\r\n";
fputs($fp, $headers);
$resp = "";
while(!feof($fp))
{
$resp .= fgets($fp, 128);
}
$name = parse("<head><title>", "</title>", $resp);
$image = "http://www.world-art.ru/cinema/".parse("><img src='", "' border=1 alt=", $resp);
$info = parse("></td></tr></table><table width=100%><tr><td><p align=justify class='review'>", "</p>", $resp);
$info2 = parse("</td></tr></table><table width=100%><tr><td><p align=justify class='review'>", "</p></td></tr></table><br><br></center><br><table width=100%", $resp);
print "<strong>Name:</strong> $name<br><img src=$image><br><strong>Info:</strong> $info$info2<hr width=100% style='border:Solid 2px;border-color:#006699'>";
flush();
fclose($fp);
}
?>
</body>
</html>
В конфиге вводишь с какой по какой id собрать. Для DLE не сделал т.к. не когда с ним не работал) Но думаю потом зарелизить нормальный граббер под DLE, летом где-то 
|
|
|