Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP: Heise Ticker 10 neuesten Nachrichten

Empfohlene Antworten

Mahlzeit.

habs bis jetzt hinbekommen, das er mir alle nachrichten anzeigt oder jetzt nachricht zehn mal aber nicht die neuestens zehn nachrichten. der Cod sieht so aus


<?php
$data = join("", file("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("=<item>(.+)</item>=sU", $data, $items);
$new1=0;
for ($new1=0;$new1<10;$new1++){
foreach ($items[1] as $item) {
//if($new1=="0")
//{
preg_match("=<title>(.+)</title>=U", $item, $title);
preg_match("=<link>(.+)</link>=U", $item, $link);
echo "<a href=\"$link[1]\">$title[1]</a> +++ ";

}
}
?>[/PHP]

plz help

thx


<?php
$data = join("",file("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("=<item>(.+)</item>=sU", $data, $items);
for ($new1=0;$new1<10;$new1++){
$item=$items[1][$new1];
preg_match("=<title>(.+)</title>=U", $item, $title);
preg_match("=<link>(.+)</link>=U", $item, $link);
echo "<a href=\"$link[1]\">$title[1]</a> +++ ";
}
?>
[/PHP]

so gehts :uli

Noch leichter geht 's mit dem PEAR RSS-Parser:



<?php
require_once "XML/RSS.php";
$rss =& new XML_RSS("http://www.heise.de/newsticker/heise.rdf");
$rss->parse();
$count = 0;
foreach ($rss->getItems() as $item) {
if ($count++ < 10)
echo "<a href=\"" . $item['link'] . "\">" . $item['title'] . "</a> +++ ";
}
}
[/PHP]

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.