Home « Server software «
Documentation: files/feed.php
files/feed.php - List new files in the RSS 2.0 format
This script gives the list of the newest published files, with following information:- title - the title or name of the file
- link - the absolute url to view the download page
- guid
- description - file description, if any
- pubDate - the date and time of file last modification
- dc:creator - the initial poster
- enclosure - a link to download the file
Here is a sample item from a test feed:
<item>
<title>40stars.gif</title>
<link>http://127.0.0.1/yacs/files/view.php/19</link>
<guid isPermaLink="true">http://127.0.0.1/yacs/files/view.php/19</guid>
<description></description>
<dc:creator>Bernard</dc:creator>
<category>40stars.gif</category>
<pubDate>Wed, 22 Dec 2004 23:13:48 GMT</pubDate>
<enclosure url="http://127.0.0.1/yacs/files/article/396/40stars.gif" length="1153" type="application/download"/>
</item>
If following features are enabled, this script will use them:
- compression - Through gzip, we have observed a shift from 3566 bytes to 881 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
Anonymous access is authorized, but only public files will be listed.
This feeder can be constrained to list files related to articles placed one single section. Therefore, it becomes quite easy to implement podcasting or appcasting. Create a dedicated section and populate it with articles and attached files. Then use this script to fetch files only from the dedicated section.
Accept following invocations:
- feed.php
- feed.php/section/12
- feed.php?section=12
This script is a reference file of this system.
Voir aussi:
- RSS 2.0 Specification
- The RSS Enclosure Exposure
- What is Podcasting?
- http://en.wikipedia.org/wiki/Podcasting
- Appcasting
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
Reste à faire:
- derive this to links as well (pat)
- support Media RSS from yahoo http://search.yahoo.com/mrss