Jump to content
View in the app

A better way to browse. Learn more.

Next

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.

Parsage de fil RSS avec PHP 5

Featured Replies

Posted

Bonjour à toutes et à tous,

J'ai fait en php 5 un petit script qui me permet de parser un fil RSS.

Pour l'instant, ça marche plutôt bien :


$fil = simplexml_load_file('rss.xml');
echo "<ul>";
foreach($fil->channel->item as $item) {
  echo "<li><a href=\"".$item->link."\">".$item->title."</a></li>";
}
echo "</ul>";
}

Mais, j'essaye de récupérer des infos sur la date, la langue... qui sont présents sous cette forme dans le fichier xml :


<dc:language>fr</dc:language>
<dc:date>...</dc:date>

et je n'arrive pas à les récupérer avec $item->dc:date, qui provoque une erreur (à cause des deux points je suppose...)

est-ce que vous avez une solution ?

Merci :-)

Tuxedo

Archived

This topic is now archived and is closed to further replies.

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.