Aller au contenu
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.

lecture d'un flux rss [resolu]

Featured Replies

Posté(e)

bonjour!

j'essaye de lire un flux rss sur un site, mais malgré un code des plus simplifié ca ne fonctionne pas.

le flux est du type:

<channel>

 <item>
   <guid>http://www.monsite.com/monarticle.html</guid>
   <title>mon super article de lamort</title>
   <link>http://www.monsite.com/monarticle.html</link>
   <description>Un bout de mon article</description>
 </item></channel>

mon script pour lelire est le plus simple du monde:

<? 

$rss = simplexml_load_file('http://www.monsite.com/flux.rss');
$i=0;
	 foreach ($rss->[b]channel->[/b]item as $item) {
		 if($i < 5)
			 {
			   echo '
						<a href="'.$item->link.'" target="_blank">'.$item->title.'</a>';
			  $i++;

				 }}

?>

une idée du pourquoi du comment? merci :) j'avais oublier de mettre channel :francais:

Modifié par jer666

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

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.