我有一个包含一组论坛的 php 网站。我想在这些特定论坛中添加有关特定主题的最新文章。所以基本上每个论坛都会有不同的文章集。我应该寻找实现 RSS 提要的 Web 应用程序吗?我也找不到带有图像的 RSS 提要。可能吗?
PS 我没有 XML 语言的知识。
任何帮助都感激不尽。谢谢
您需要动态创建 RSS 提要并将其托管在某处。假设您有一个 PHP 网站,那么您已经有了一个“网络应用程序”。您可以构建一些东西来读取论坛类别和文章并将简单的 RSS 吐到屏幕上。然后将您的 RSS 图标(如果您正在这样做)链接到该页面。
创建 RSS 提要实际上非常简单。
例如:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>The RSS title</title>
<link>The link to this page, i.e. your feed</link>
<description>Description for the feed. Some readers use that so make it nice :)</description>
<!-- Repeat as many items as you need, i.e. as the number of your articles -->
<item>
<title>Some article title</title>
<link>http://link/to/article</link>
<description>Article description, long or short</description>
<guid>http://webdesign.about.com/rss2.0feed/entry.html</guid>
<!-- Use enclosures for elements like images audio etc. -->
<enclosure url="http://url/of/the/pic" length="size_of_the_pic" type="image/jpeg"/>
</item>
<!-- end repeat -->
</channel>
</rss>
以下是一些有助于您理解的在线资源:
http://webdesign.about.com/od/rss/a/aa062707.htm http://www.mnot.net/rss/tutorial/