rss正在成为Internet的基石
rss 就是简易内容同步系统,有0.9x,1.0,2.0等版本,基本兼容。
rss 其实就是一个xml文档,符合特定格式(就是上面说的3种规范)。
有了它,你不必登录你感兴趣的几十个(乃至更多)站点,
你在一个页面可以尽览这些站点的你没有看过的最新内容,
可以大大节约你的时间。
信息时代,信息太多了,多得你接受不过来,
rss 就是帮助你快速定位你感兴趣的专题的最新内容,
大大节约你获取信息的时间。
rss 也是真正blog的不可或缺的基石。
做blog,先从支持rss开始。
------
回复此文章 |
提到xml文档,
希望推荐一本书来看看关于xml的东西
作天在王府井看了一下
关于这方面的东西还真不少。
真是不知道买那本好
------
回复此文章 |
大家在注意到了吗,咱们的BBS今天添加了一个醒目的小图标:Rss 2.0.
这标志着,我们也开始RSS了。
------
回复此文章 |
我们的程序不够严密,未对某些变量加以过滤。
点左侧的导航菜单的RSS图标,可能没有问题。
左侧的RSS是整个bbs的rss,
而上面的rss是卓大人版的rss.
------
回复此文章 |
页面显示:
无法显示 XML 页。
使用 XSL 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。
结束标记 'item' 与开始标记 'description' 不匹配。处理资源 'http://www.zhuodau.org/bbs/rssThread.php' 时出错。第 44 行,位置:
--^
------
回复此文章 |
已经改正过来了。
RSS很cool的,可惜,本站的支持者们好像重视得不够。
------
回复此文章 |
http://www.zhuodau.org/bbs/message.php?forumID=3&&threadID=3036&mp=1
你可能还不会使用rss,读上文吧。
------
回复此文章 |
刚打开页面时还以为是源代码,仔细一看原来是一些新的帖子,这东西还真不错,但感觉比较乱,看着有一点费劲,有的帖子内容与原文不全,格式不规范,如:
[分类讨论区:卓大人版]网络恐龙青蛙的进化史[表] 性别??性 级别癞蛤蟆 暴 龙 || 蛤蟆 饿 龙 | | 青 蛙 恐 龙 | ......
能不能每个帖子都有个连接,可以跳到原文去看?
------
回复此文章 |
<?
/**********************************************************************************
* rss.php
* Version: 1.00
* Author: Rogers Cadenhead
* Date: 05/21/2004
* http://www.cadenhead.org/workbench/
*
**********************************************************************************
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This work is hereby released into the Public Domain. To view a copy of the public
domain dedication, visit http://creativecommons.org/licenses/publicdomain/ or
send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
94305, USA.
**********************************************************************************/
// prepare HTML text for use as UTF-8 character data in XML
function cleanText($intext) {
return utf8_encode(
htmlspecialchars(
stripslashes($intext)));
}
// set the file's content type and character set
// this must be called before any output
header("Content-Type: text/xml;charset=utf-8");
// retrieve database records
include('db_connect.php');
// the file db_connect.php contains only one line:
// $db = mysql_pconnect("localhost", "usernameHere", "passwordHere");
// it should be readable only by the user running the Web server
// and saved outside of the directory tree that holds Web pages
if (!$db)
{
error_log("Error: Could not connect to database in rss.php.");
exit;
}
// store items from the database in the $result1 array
mysql_select_db("cadenhead");
$query1 = "select * from booksupport where bookcode='java21days' and description != '' and status=1 order by dex desc limit 10";
$result1 = mysql_query($query1);
$phpversion = phpversion();
// display RSS 2.0 channel information
ECHO <<<END
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Teach Yourself Java 2 in 21 Days, Third Edition</title>
<link>http://www.cadenhead.org/book/java21days/</link>
<description>Updates to the Web site of the book Teach Yourself Java 2 in 21 Days, Third Edition by Rogers Cadenhead and Laura Lemay.</description>
<language>en-us</language>
<docs>http://backend.userland.com/rss</docs>
<generator>PHP/$phpversion</generator>
END;
// loop through the array pulling database fields for each item
for ($i = 0; $i < mysql_num_rows($result1); $i++) {
@$row = mysql_fetch_array($result1);
$title = "Day ".cleanText($row["chapter"])." Update";
$link = "http://www.cadenhead.org/book/java21days/chapter.php/".
cleanText($row["chapter"]);
$
rss 其实就是一个xml文档,符合特定格式(就是上面说的3种规范)。
有了它,你不必登录你感兴趣的几十个(乃至更多)站点,
你在一个页面可以尽览这些站点的你没有看过的最新内容,
可以大大节约你的时间。
信息时代,信息太多了,多得你接受不过来,
rss 就是帮助你快速定位你感兴趣的专题的最新内容,
大大节约你获取信息的时间。
rss 也是真正blog的不可或缺的基石。
做blog,先从支持rss开始。
------
回复此文章 |
提到xml文档,
希望推荐一本书来看看关于xml的东西
作天在王府井看了一下
关于这方面的东西还真不少。
真是不知道买那本好
------
回复此文章 |
大家在注意到了吗,咱们的BBS今天添加了一个醒目的小图标:Rss 2.0.
这标志着,我们也开始RSS了。
------
回复此文章 |
我们的程序不够严密,未对某些变量加以过滤。
点左侧的导航菜单的RSS图标,可能没有问题。
左侧的RSS是整个bbs的rss,
而上面的rss是卓大人版的rss.
------
回复此文章 |
页面显示:
无法显示 XML 页。
使用 XSL 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。
结束标记 'item' 与开始标记 'description' 不匹配。处理资源 'http://www.zhuodau.org/bbs/rssThread.php' 时出错。第 44 行,位置:
--^
------
回复此文章 |
已经改正过来了。
RSS很cool的,可惜,本站的支持者们好像重视得不够。
------
回复此文章 |
http://www.zhuodau.org/bbs/message.php?forumID=3&&threadID=3036&mp=1
你可能还不会使用rss,读上文吧。
------
回复此文章 |
刚打开页面时还以为是源代码,仔细一看原来是一些新的帖子,这东西还真不错,但感觉比较乱,看着有一点费劲,有的帖子内容与原文不全,格式不规范,如:
[分类讨论区:卓大人版]网络恐龙青蛙的进化史[表] 性别??性 级别癞蛤蟆 暴 龙 || 蛤蟆 饿 龙 | | 青 蛙 恐 龙 | ......
能不能每个帖子都有个连接,可以跳到原文去看?
------
回复此文章 |
<?
/**********************************************************************************
* rss.php
* Version: 1.00
* Author: Rogers Cadenhead
* Date: 05/21/2004
* http://www.cadenhead.org/workbench/
*
**********************************************************************************
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This work is hereby released into the Public Domain. To view a copy of the public
domain dedication, visit http://creativecommons.org/licenses/publicdomain/ or
send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
94305, USA.
**********************************************************************************/
// prepare HTML text for use as UTF-8 character data in XML
function cleanText($intext) {
return utf8_encode(
htmlspecialchars(
stripslashes($intext)));
}
// set the file's content type and character set
// this must be called before any output
header("Content-Type: text/xml;charset=utf-8");
// retrieve database records
include('db_connect.php');
// the file db_connect.php contains only one line:
// $db = mysql_pconnect("localhost", "usernameHere", "passwordHere");
// it should be readable only by the user running the Web server
// and saved outside of the directory tree that holds Web pages
if (!$db)
{
error_log("Error: Could not connect to database in rss.php.");
exit;
}
// store items from the database in the $result1 array
mysql_select_db("cadenhead");
$query1 = "select * from booksupport where bookcode='java21days' and description != '' and status=1 order by dex desc limit 10";
$result1 = mysql_query($query1);
$phpversion = phpversion();
// display RSS 2.0 channel information
ECHO <<<END
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Teach Yourself Java 2 in 21 Days, Third Edition</title>
<link>http://www.cadenhead.org/book/java21days/</link>
<description>Updates to the Web site of the book Teach Yourself Java 2 in 21 Days, Third Edition by Rogers Cadenhead and Laura Lemay.</description>
<language>en-us</language>
<docs>http://backend.userland.com/rss</docs>
<generator>PHP/$phpversion</generator>
END;
// loop through the array pulling database fields for each item
for ($i = 0; $i < mysql_num_rows($result1); $i++) {
@$row = mysql_fetch_array($result1);
$title = "Day ".cleanText($row["chapter"])." Update";
$link = "http://www.cadenhead.org/book/java21days/chapter.php/".
cleanText($row["chapter"]);
$
hofman
2005-11-19 22:42:50
评论:0
阅读:371
引用:0
