-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.php
40 lines (32 loc) · 1.04 KB
/
feed.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
<?php
header("Content-Type: application/xml; charset=ISO-8859-1");
include("include/rss/rss.php");
include("config.php");
include("shared.php");
$myfeed = new RSSFeed();
$myfeed->SetChannel('http://www.mysite.com/xml.rss', // Get website url
$sitename."RSS feed",
$sitedescription,
'en-us', // Select encoding from $lang
'My copyright text', // Get Copyright from?
'me', // Get
'my subject');
$myfeed->SetImage('http://www.mysite.com/mylogo.jpg');
/* use feed.php from whatever you want */
$from = getparam("from", PAR_GET, SAN_FLAT);
if($from == "news") {
/* here we can Re-Set channel with specific informations
$myfeed->SetChannel(...) */
for($i = 0; $i < $newspp; $i++) {
/* remove this and use flatnuke API */
/************************************/
$name = "news ".$i;
$description = "Description ".$i;
/************************************/
$myfeed->AddItem('http://www.mysite.com/article.php?id='.$i,
$name,
$description);
}
}
echo $myfeed->output();
?>