In der heise-rdf gibt es diese Struktur:
- <item>
<title>...TITEL...</title>
<link>...LINK...</link>
</item>
In der neuen rdf gibt es nun aber diese Struktur:
- <item>
<title>...TITEL...</title>
<link>...LINK...</link>
<description>...TEXT...</description>
</item>
Das Heise-Script sieht so aus:
Code: Alles auswählen
<?PHP
$fcontents = join ('', file ('http://www.heise.de/newsticker/heise.rdf'));
$fcontents = str_replace ("</item>", "", $fcontents);
$fcontents = str_replace ("</link>", "", $fcontents);
$splices = explode ("<item>", $fcontents);
for ($i = 1; $i < count($splices); $i++){
$link = explode("<link>",$splices[$i]);
$link[1] = strip_tags($link[1]);
$headline = str_replace ("<title>", "<a href=\"" . trim($link[1]) . "\" target=\"_blank\" class=\"heiseheadline\">", $splices[$i]);
$headline = str_replace ("</title>", "</a>", $headline);
$headline = explode ("<link>", $headline);
$headline = $headline[0];
print $headline . "<img src=\"1.gif\" height=20 width=1 align=top><br>";
}
?>
Ich kann zu wenig PHP, um die nötigen Änderungen durchzuführen. Kann mir jemand helfen?
Danke!