core/parcer/rssreader.php

9 lines
298 B
PHP
Raw Permalink Normal View History

<?php
$rss = simplexml_load_file('https://pingvinus.ru/rss.xml');
echo '<h2>'. $rss->channel->title . '</h2>';
foreach ($rss->channel->item as $item)
{
echo '<p class="title"><a href="'. $item->link .'">' . $item->title . "</a></p>";
echo "<p class='desc'>" . $item->description . "</p>";
}
?>