-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrss2.php
More file actions
33 lines (26 loc) · 691 Bytes
/
rss2.php
File metadata and controls
33 lines (26 loc) · 691 Bytes
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
<?php
header('Content-Type: application/xml; charset=utf-8');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<rss version=\"2.0\">
<channel>
<title>RSS output</title>
<link>http://www.events.com</link>
<description>Free Events for all</description>\n";
include("sindesi.php"); //sindesi me ti vasi
$cat=$_POST['cat'];
foreach ($cat as $v)
{
$query="select * from events where category like '%$v%' limit 0,10";
$t=mysqli_query($cnt,$query);
while ($r=mysqli_fetch_array($t))
{
echo "<item>
<title>$r[onoma]</title>
<start_time>$r[date_start]</start_time>
<owner>$r[owner]</owner>
<category>$r[category]</category>
</item>\n";
}
}
?>
</channel></rss>