generated from brunoducegep/Projet-Web-Dynamique-2021
/
rss.php
48 lines (40 loc) · 2 KB
/
rss.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
require "configuration.php";
require "accesseurs/MissionApolloDAO.php";
$listeMission = MissionApolloDAO::listerMissionApollo();
header("Content-Type: application/xml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?>'
?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndecation/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
<title>Liste de missions Apollo</title>
<atom:link href="https://lune.mayalennox.com//rss.php/" rel="self" type="application/rss+xml" />
<link>https://lune.mayalennox.com//index.php</link>
<description>Une liste des missions Apollo</description>
<lastBuildDate>Tue, 19 mar 2021 20:52:40 -0500</lastBuildDate>
<language>fr-CA</language>
<sy:updatePeriod> hourly </sy:updatePeriod>
<sy:updateFrequency> 1 </sy:updateFrequency>
<generator>Programmation manuelle</generator>
<?php
foreach ($listeMission as $missionApollo) {
?>
<item>
<title><?= $missionApollo['titre'] ?></title>
<link>https://lune.mayalennox.com/?id=<?= $missionApollo['id'] ?></link>
<pubDate>Tue, 19 mar 2021 20:52:40 -0500</pubDate>
<category>
<![CDATA[Utilisateurs]]>
</category>
<guid isPermaLink="false">https://lune.mayalennox.com/?id=<?= $missionApollo['id'] ?></guid>
<description>
<![CDATA[<img src="https://lune.mayalennox.com//image/<?= $missionApollo['image'] ?>" alt="image"/>]]>
<![CDATA[<?= $missionApollo['astronautes'] ?>/>]]>
<![CDATA[<?= $missionApollo['date'] ?>/>]]>
</description>
</item>
<?php
}
?>
</channel>
</rss>