www.gusucode.com > Tatter Tools 0.961 SE GB2312 简体中文版 > upload/admin/reader_opml_export.php
<? include("../inc_global.php"); include("../inc_function.php"); check_authority(); $rss .= "<?xml version=\"1.0\" encoding=\"gb2312\" ?>\r\n"; $rss .= "<opml version=\"1.0\">\r\n"; $rss .= "<head>\r\n"; $rss .= "<title>Tatter Feeds</title>\r\n"; $rss .= "<ownerName></ownerName>\r\n"; $rss .= "<ownerEmail></ownerEmail>\r\n"; $rss .= "</head>\r\n"; $rss .= "<body>\r\n"; $sql = " select no, xml_url, title, link, description, regdate, is_sync from t3_".$dbid."_rss order by title asc "; $result = @mysql_query($sql); while(list($no, $xml_url, $title, $link, $description, $regdate, $is_sync) = @mysql_fetch_array($result)) { $title = htmlspecialchars($title); $description = htmlspecialchars($description); $regdate = get_rss_stamp($regdate); $rss .= "<outline text=\"$title\" description=\"$description\" htmlUrl=\"$link\" title=\"$title\" type=\"rss\" version=\"RSS\" xmlUrl=\"$xml_url\" />\r\n"; } $rss .= "</body>\r\n"; $rss .= "</opml>"; header("Content-type: application"); header("Content-Disposition: attachment; filename=t3_reader_feed_".date("Ymd").".opml"); header("Content-Description: PHP4 Generated Data"); print $rss; ?>