add mp rss summary
This commit is contained in:
parent
bb11d11087
commit
f01bd12d3d
18
epub.php
18
epub.php
|
@ -567,6 +567,10 @@
|
||||||
<br>
|
<br>
|
||||||
<input id="forcempcookies" name="forcempcookies" type="checkbox">
|
<input id="forcempcookies" name="forcempcookies" type="checkbox">
|
||||||
<label for="forcempcookies">Force cookies</label>
|
<label for="forcempcookies">Force cookies</label>
|
||||||
|
<br>
|
||||||
|
<input id="mptoday" name="mptoday" type="checkbox" disabled>
|
||||||
|
<label for="mptoday">Today only</label>
|
||||||
|
<br>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
@ -590,6 +594,18 @@
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<a href="../epub">Fichiers générés</a><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>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue