Re: RSS feeder in PHP5?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is there something in PHP5 which can generate the RSS feed?

You don't need an extension to help you generate an XML feed. You
dimply output XML data instead of HTML and send an appropriate content
type header, eg:

header('Content-Type: text/xml');

And the actual data:

<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="0.91">
    <channel>
        <title><!-- The title of your feed --></title>
        <link><!-- The URL to your website --></link>
        <description>
            <!-- A summary of your feed -->
        </description>
            <item>
                <title><!-- The title of your feed --></title>
                <link><!-- The link to the article --></link>
                <pubDate><!-- The data of the article --></pubDate>
                <description>
                    <!-- The text of the article or a preview -->
                </description>
            </item>
    </channel>
</rss>

-- 
Richard Heyes

HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 4th)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux