Compare commits

..

2 Commits

Author SHA1 Message Date
quenousimporte cb59059a2b Merge branch 'main' of https://git.ouvaton.coop/quenousimporte/presse 2024-08-26 12:17:46 +02:00
quenousimporte f01bd12d3d add mp rss summary 2024-08-26 11:01:20 +02:00
1 changed files with 17 additions and 1 deletions

View File

@ -660,6 +660,10 @@
<br>
<input id="forcempcookies" name="forcempcookies" type="checkbox">
<label for="forcempcookies">Force cookies</label>
<br>
<input id="mptoday" name="mptoday" type="checkbox" disabled>
<label for="mptoday">Today only</label>
<br>
<br><br>
@ -683,6 +687,18 @@
</div>
<br>
<a href="../epub">Fichiers générés</a><br>
<a href="../">Revue de presse</a>
<a href="../">Revue de presse</a><br>
<br>
<b>Mediapart RSS summary</b>
<br>
<?php
$mprss = file_get_contents('https://www.mediapart.fr/articles/feed', false, $context);
$xml = new SimpleXMLElement($mprss);
$items = $xml->xpath("/rss/channel/item");
foreach ($items as $item)
{
echo '<div><a href="'.$item->link.'">'.$item->pubDate. ' '.$item->title.'</a></div>';
}
?>
</body>
</html>