]>
git.wh0rd.org - tt-rss.git/blob - opml.php
2 // FIXME there are some brackets issues here
6 header("Content-type: application/xml");
9 require_once "config.php";
10 require_once "functions.php";
12 $link = pg_connect(DB_CONN
);
14 pg_query($link, "set client_encoding = 'utf-8'");
16 if ($op == "export") {
17 print "<?xml version=\"1.0\"?>";
18 print "<opml version=\"1.0\">";
19 print "<head><dateCreated>" . date("r", time()) . "</dateCreated></head>";
22 $result = pg_query("SELECT * FROM ttrss_feeds ORDER BY title");
24 while ($line = pg_fetch_assoc($result)) {
25 $title = $line["title"];
26 $url = $line["feed_url"];
28 print "<outline text=\"$title\" xmlUrl=\"$url\"/>";
31 print "</body></opml>";