Home « Server software «
Documentation: feeds/rss_1.0.php
feeds/rss_1.0.php - Provide news in the RSS 1.0 format
This script lists the ten newest published articles, providing following information:- title - the title of the article
- url - the absolute url to fetch the article
- time - the date and time of article last modification
- author - the last contributor to the article
- section - the label of the section from where the article is originated
- image - the absolute url to fetch a related image, if any
You will find below an excerpt of a real RSS 1.0 feed:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.php.net/">
<title>PHP: Hypertext Preprocessor</title>
<link>http://www.php.net/</link>
<description>The PHP scripting language web site</description>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://qa.php.net/" />
...
<rdf:li rdf:resource="http://www.php.net/downloads.php" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://qa.php.net/">
<title>PHP 4.3.0RC4 Released</title>
<link>http://qa.php.net/</link>
<description> Despite our best efforts, it was necessary to make one more release candidate, hence PHP 4.3.0RC4. This one mainly corrects the CGI vs CLI SAPI naming and fixes a couple of bugs. It is supposed to have a short testing cycle, after which the final version will be put out, hopefully before the end of the year. </description>
</item>
...
<item rdf:about="http://www.php.net/downloads.php">
<title>PHP 4.2.3 Released</title>
<link>http://www.php.net/downloads.php</link>
<description> PHP 4.2.3 has been released with a large number of bug fixes. It is a maintenance release, and is a recommended update for all users of PHP, and Windows users in particular. A complete list of changes can be found in the ChangeLog. </description>
</item>
</rdf:RDF>
If following features are enabled, this script will use them:
- compression - Through gzip, we have observed a shift from 3859 bytes to 964 bytes, meaning one Ethernet frame rather than three
- cache - Cache is supported through ETag and by setting Content-Length; Also, Cache-Control enables caching for some time, even through HTTPS
If the geographical position of the server has been set through the configuration panel for skins, it is included into the feed as well.
This script is a reference file of this system.
Voir aussi:
- RDF Site Summary (RSS) 1.0 Specification
- RSS Flow, Measured
- Optimising your feed
- RDFIG Geo vocab workspace
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com