-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeed.php
More file actions
80 lines (45 loc) · 1.01 KB
/
feed.php
File metadata and controls
80 lines (45 loc) · 1.01 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
set_include_path(realpath(dirname(__FILE__) . '/inc'));
/**
* Create a feed from some content
*
*
*/
/*
require_once 'Zend/Feed.php';
$feed = array(
'title' => 'My RSS Feed',
'link' => 'http://localhost/tripugzf/feed.php',
'charset' => 'UTF-8',
'author' => 'Jason',
'entries' => array(
0 => array(
'title' => 'Post 1',
'link' => 'http://localhost/tripugzf/feed.php?id=1',
'description' => 'This is my first post',
'lastUpdate' => time(),
),
1 => array(
'title' => 'Post 2',
'link' => 'http://localhost/tripugzf/feed.php?id=2',
'description' => 'This is my second post',
'lastUpdate' => time(),
),
),
);
$rssFeed = Zend_Feed::importArray($feed, 'rss');
$rssFeed->send();
*/
/**
* consume an RSS feed
*
*
*/
/*
require_once 'Zend/Feed/Rss.php';
$awesome = new Zend_Feed_Rss('http://www.jasonawesome.com/feed');
foreach ($awesome as $a) {
echo "<h3>" . $a->title . "</h3>";
echo $a->description;
}
*/