Home « Server software «
Documentation: agents/feed.php
agents/feed.php - List logged events as a RSS feed
This script may be used by site administrators to stay tuned to their web site.Basically, this script extracts most recent events from the system log, and formats it according to RSS specification. For each event, following attributes are provided:
- title - event label
- description - any additional text attached to the event
- pubDate - date and time of event
- category - script name (e.g., 'articles.index.php')
- link and guid are provided for readers to get unique identifiers for events
The surfer has to be an authenticated associate. He will have either used the regular login page, or provide name and password on a per-request basis.
Per-request authentication is based on HTTP basic authentication mechanism, as explained in RFC2617.
If an unknown user asks for the RSS feed, he will be prompted by his user agent to enter his name and password. This mechanism has been checked with FeedReader 2.7, Internet Explorer 6.0, and Mozilla 1.7.3.
The RFC explicitly allows for building URLs including the name and the password, as in the following example:
http://my_name:my_password@my_site/yacs/agents/feed.php
Such links can be used in user agents (i.e., a lot of poorly written news readers) that do not handle HTTP authentication properly. However, please note that Microsoft has recently removed support for such URLs. This may means that some news readers based on Internet Explorer won't be able to get YACS events log. If this occurs, please consider to switch to standard-conformant software such as Feedreader.
If following features are enabled, this script will use them:
- compression - Through gzip, we have observed a shift from 2900 bytes to 909 bytes, meaning one Ethernet frame rather than two
- cache - Cache is supported through ETag and by setting Content-Length; Also, Cache-Control enables caching for some time, even through HTTPS
This script is a reference file of this system.
Voir aussi:
- RSS 2.0 Specification
- HTTP Authentication: Basic and Digest Access Authentication
- Microsoft Knowledge Base Article - 834489
- RSS Flow, Measured
- Optimising your feed
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com