Knowledgebase:RSS Feed Verzeichnis

From Cloudrexx Development Wiki
Jump to: navigation, search
Handbuch

Kurzbeschreibung

Anwendung

Dateien

  • Alle Dateien des RSS Feed Moduls liegen im Verzeichnis modules/feed/*

Platzhalter

FAQ

RSS Manuel Hinzufügen

 <?php
 $backend   = "http://www.heise.de/newsticker/heise.rdf";
 $max_items = 10;
 $items  = 0;
 $ausgabe_temp = "heise RSS News";
 $fpread = fopen($backend, 'r');
 if(!$fpread) {
     echo "error $errstr ($errno)
\n"; exit; } else { while(! feof($fpread) ) { $buffer = ltrim(Chop(fgets($fpread, 256))); if (($buffer == "<item>") && ($items < $max_items)) { $title = ltrim(Chop(fgets($fpread, 256))); $link = ltrim(Chop(fgets($fpread, 256))); $title = ereg_replace( "<title>", "", $title ); $title = ereg_replace( "</title>", "", $title ); $link = ereg_replace( "<link>", "", $link ); $link = ereg_replace( "</link>", "", $link ); $ausgabe_temp .= "<a href=\"".$link."\">".$title."</a>" ; $items++; } } fclose($fpread); } echo $ausgabe_temp;  ?>