请问各位高手,如何用PHP创建RSS?(我已经没分了,感激不尽)!
那位可否提供例子或源码啊,小弟学一下,多谢了!!

解决方案 »

  1.   

    去w3c看rss协议.
    然后按照rss的格式,用php的echo打印出来.
    下面就是一个rss文件,用echo将其打印出来就可以了.<?xml version="1.0"?>
    <rss version="2.0">
        <channel>
        <title>The channel's name goes here</title>
        <link>http://www.urlofthechannel.com/</link>
        <description>This channel is an example channel for an article.
        </description>
        <language>en-us</language>
        <image>
          <title>The image title goes here</title>
          <url>http://www.urlofthechannel.com/images/logo.gif</url>
          <link>http://www.urlofthechannel.com/</link>
        </image>
        <item>
          <title>The Future of content</title>
          <link>http://www.itworld.com/nl/ecom_in_act/11122003/</link>
          <description> The issue of people distributing and reusing
          digital media is a problem for many businesses. It may also be
          a hidden opportunity. Just as open source licensing has opened
          up new possibilities in the world of technology, it promises to do
          the same in the area of creative content.</description>
        </item>
        <item>
          <title>Online Music Services - Better than free?</title>
          <link>http://www.itworld.com/nl/ecom_in_act/08202003/</link>
          <description>More people than ever are downloading music from 
          the Internet. Many use person-to-person file sharing programs like 
          Kazaa to share and download music in MP3 format, paying nothing. 
          This has made it difficult for companies to setup online music 
          businesses. How can companies compete against free?</description>
        </item>
      </channel>
    </rss>
      

  2.   

    说得已经很够详细了.首先你要解决一个思想的误区,不是说PHP有一个函数直接OVER一下就出来RSS了.是要你自己输出格式的.就这么简单.XML也一样