-
Notifications
You must be signed in to change notification settings - Fork 1
/
rss.php
47 lines (43 loc) · 1.65 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
<?php
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<?php
include 'sql.php';
srand(strtotime("today"));
$pubTime = strtotime(rand(3,7).":".rand(0,59));
if($pubTime > time()) {
srand(strtotime("yesterday"));
$pubTime = strtotime("Yesterday ".rand(3,7).":".rand(0,59));
}
$szikra = $szikrak[date('n', $pubTime)][date('j', $pubTime)];
?>
<channel>
<language>hu</language>
<link><?php echo $url; ?></link>
<title><?php echo strip_tags($pageTitle); ?></title>
<description><?php echo $pageDescription; ?></description>
<category><?php echo $pageCategory; ?></category>
<copyright><?php echo $pageCopyright; ?></copyright>
<!--
<image>
<url>http://www.feedforall.com/feedforall-temp.gif</url>
<title>FeedForAll Sample Feed</title>
<link>http://www.feedforall.com/industry-solutions.htm</link>
<description>FeedForAll Sample Feed</description>
<width>144</width>
<height>117</height>
</image>
-->
<item>
<guid isPermaLink="false"><?php echo date('Y', $pubTime).preg_replace('/\//','-',$szikra['url']); ?></guid>
<title><?php echo strip_tags($pageTitle)." - ".$szikra['dateHun']; ?></title>
<description><?php echo $szikra['text']; ?></description>
<link><?php echo $url.$szikra['url']; ?></link>
<image:image xmlns:image="http://szikrak.jezsuita.hu/image.php?d=<?php echo trim($szikra['url'],'/'); ?>" />
<media:content url="http://szikrak.jezsuita.hu/image.php?d=<?php echo trim($szikra['url'],'/'); ?>" medium="image" />
<pubDate><?php echo date('r', $pubTime); ?></pubDate>
</item>
</channel>
</rss>