|
Codeschnipsel
News von Heise
Dieses Script macht es möglich, die News von heise.de auch in deine Homepage
einzubinden.
Hier gibt es eine Vorschau: Demo
Autor: Fabian Karg  |
<?php print "<span class='text2'><table align='center' border='0' >";
$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 "<tr><td> $headline</td></tr>"; } print "</table></span>"; ?>
|
Tipps:
|
|