Bonjour,
qui peut me dire comment, facilement, il est possible d'intégrer une page d'actualité sur son site ?
Merci pour les réponses.
$nexen = simplexml_load_file('http://www.nexen.net/index2.php?option=com_rss&feed=RSS2.0&no_html=1');
foreach ($nexen->channel->item as $n) {
echo utf8_decode( sprintf('<a href="%s">%s</a><br>', $n->link[0], htmlspecialchars($n->title[0]) ) );
}<?php
$nexen = simplexml_load_file('http://www.nexen.net/index2.php?option=com_rss&feed=RSS2.0&no_html=1');
foreach ($nexen->channel->item as $n)
{
echo utf8_decode( sprintf('<a href="%s">%s</a><br>', $n->link[0], htmlspecialchars($n->title[0])));
}
?>
pour essayer, j'ai copier/coller ton code, mais j'obtiens un message d'erreur: <?php
$yahoo = simplexml_load_file('http://fr.news.search.yahoo.com/search/news?fr=news_sb_hd&source=yahoo&p="formation%20professionnelle"&ei=ISO-8859-1');
foreach ($yahoo->channel->item as $n)
{
echo utf8_decode( sprintf('<a href="%s">%s</a><br>', $n->link[0], htmlspecialchars($n->title[0])));
}
?>
En fait j'ai voulu modifier en remplaçant l'adresse. Et là ça ne marche plus.