Soo ich hab dich nicht vergessen
Also funktioniert wunderbar in einer .php einfach in include/contents/
rssliste.php
<?php
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'];
$hmenu = 'RSS - Liste';
$design = new design ( $title , $hmenu );
$design->header();
// Konfiguration
$url1 = 'http://www.n24.de/2/index.rss'; //Link zum RSS
$url2 = 'http://facecom.fa.funpic.de//index.php?news-rss'; //Link zum RSS
$url3 = 'http://singlelove.si.funpic.de//index.php?news-rss'; //Link zum RSS
$url4 = 'http://www.sachsen-spion.de/rss/rss.xml'; //Link zum RSS
$number = '6'; //Maximale Anzahl an RSS
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
curl_close ($ch);
$xml = new SimpleXMLElement($content);
// print_r($item);
echo '<b>N 24</b>
<ul type="square">';
$i = 0;
foreach ($xml->channel->item as $entry){
if ($i >= $number) {
break;
} else {
$dates = strtotime($entry->pubDate);
$date = date('d.m.Y', $dates);
//Use that namespace
$namespaces = $entry->getNameSpaces(true);
//Now we don't have the URL hard-coded
$dc = $entry->children($namespaces['dc']);
$titlename = utf8_decode($entry->title);
echo '<li> '. $date .': <b><a class="box" href="'. $entry->link .'" title="'. utf8_decode($entry->title) .'" target="_blank">'.((strlen($titlename)<35) ? $titlename : substr($titlename,0,35).'...').'</a></b></li>';
$i++;
}
}
echo '</ul><br>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url2);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
curl_close ($ch);
$xml = new SimpleXMLElement($content);
// print_r($item);
echo '<b>FaceComNews</b>
<ul type="square">';
$i = 0;
foreach ($xml->channel->item as $entry){
if ($i >= $number) {
break;
} else {
$dates = strtotime($entry->pubDate);
$date = date('d.m.Y', $dates);
//Use that namespace
$namespaces = $entry->getNameSpaces(true);
//Now we don't have the URL hard-coded
$dc = $entry->children($namespaces['dc']);
$titlename = utf8_decode($entry->title);
echo '<li> '. $date .': <b><a class="box" href="'. $entry->link .'" title="'. utf8_decode($entry->title) .'" target="_blank">'.((strlen($titlename)<35) ? $titlename : substr($titlename,0,35).'...').'</a></b></li>';
$i++;
}
}
echo '</ul><br>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url3);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
curl_close ($ch);
$xml = new SimpleXMLElement($content);
// print_r($item);
echo '<b>SingleLoveNews</b>
<ul type="square">';
$i = 0;
foreach ($xml->channel->item as $entry){
if ($i >= $number) {
break;
} else {
$dates = strtotime($entry->pubDate);
$date = date('d.m.Y', $dates);
//Use that namespace
$namespaces = $entry->getNameSpaces(true);
//Now we don't have the URL hard-coded
$dc = $entry->children($namespaces['dc']);
$titlename = utf8_decode($entry->title);
echo '<li> '. $date .': <b><a class="box" href="'. $entry->link .'" title="'. utf8_decode($entry->title) .'" target="_blank">'.((strlen($titlename)<35) ? $titlename : substr($titlename,0,35).'...').'</a></b></li>';
$i++;
}
}
echo '</ul><br>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url4);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
curl_close ($ch);
$xml = new SimpleXMLElement($content);
// print_r($item);
echo '<b>Sachsen-Spion</b>
<ul type="square">';
$i = 0;
foreach ($xml->channel->item as $entry){
if ($i >= $number) {
break;
} else {
$dates = strtotime($entry->pubDate);
$date = date('d.m.Y', $dates);
//Use that namespace
$namespaces = $entry->getNameSpaces(true);
//Now we don't have the URL hard-coded
$dc = $entry->children($namespaces['dc']);
$titlename = utf8_decode($entry->title);
echo '<li> '. $date .': <b><a class="box" href="'. $entry->link .'" title="'. utf8_decode($entry->title) .'" target="_blank">'.((strlen($titlename)<35) ? $titlename : substr($titlename,0,35).'...').'</a></b></li>';
$i++;
}
}
echo '</ul>';
$design->footer();
?>