-
Notifications
You must be signed in to change notification settings - Fork 15
/
opml.php
executable file
·48 lines (41 loc) · 985 Bytes
/
opml.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
/*
* This file is part of FEED ON FEEDS - http://feedonfeeds.com/
*
* ompl.php - exports subscription list as OPML
*
*
* Copyright (C) 2004-2007 Stephen Minutillo
* [email protected] - http://minutillo.com/steve/
*
* Distributed under the GPL - see LICENSE
*
*/
header("Content-Type: text/xml; charset=utf-8");
header('Content-Disposition: attachment; filename="opml.xml"');
include_once "fof-main.php";
echo '<?xml version="1.0"?>';
?>
<opml version="1.1">
<head>
<title>Feed on Feeds Subscriptions</title>
</head>
<body>
<?php
$result = fof_db_get_subscriptions(fof_current_user());
while ($row = fof_db_get_row($result)) {
$url = htmlspecialchars($row['feed_url']);
$title = htmlspecialchars($row['feed_title']);
$link = htmlspecialchars($row['feed_link']);
echo <<<HEYO
<outline type="rss"
text="$title"
title="$title"
htmlUrl="$link"
xmlUrl="$url"
/>
HEYO;
}
?>
</body>
</opml>