add RSS Feed
This commit is contained in:
parent
b59a8311a6
commit
0a767310ed
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0">
|
||||
|
||||
<channel>
|
||||
<title>Fbi's Epic Guestbook RSS Feed</title>
|
||||
<link>https://www.w3schools.com</link>
|
||||
<description>A cool Guestbook made by fbievan</description>
|
||||
<?php
|
||||
$data = json_decode(file_get_contents('test.json'), true);
|
||||
?>
|
||||
<?php foreach($data as $post): ?>
|
||||
<item>
|
||||
<title><?php echo $post["name"];?></title>
|
||||
<description><?php echo htmlspecialchars($post["message"]);?></description>
|
||||
</item>
|
||||
<?php endforeach; ?>
|
||||
</channel>
|
||||
</rss>
|
Loading…
Reference in New Issue