Книги

[insert_php]
$in = fopen(‘http://oz.by/data/export.phtml?type=books&topic=2103&limit=20&img=200’, ‘r’);
$out = fopen( getenv(‘DOCUMENT_ROOT’) . “/ozbooks.txt”, ‘w’ );
while ( $str = fgets($in, 1024) ) { fputs($out, $str); }
fclose($in);
fclose($out);
[/insert_php]
[insert_php]
$file = fopen(getenv(‘DOCUMENT_ROOT’) . ‘/ozbooks.txt’, ‘r’);
while ($str = fgets($file, 1024))
{
list ($id, $title, $writer, $annotation, $img_src, $link) = split (‘~’, $str);
echo “\n$title“;
if ($writer) echo ” ($writer)”;
echo “
\n$annotation

“;
echo “

“;
}
fclose($file);
[/insert_php]

Отставить отзыв

Ваш e-mail не будет опубликован. Обязательные поля помечены *