From 433ec701892d4abe2eb3bd65202ce33631bdf5b0 Mon Sep 17 00:00:00 2001 From: aleteoryx Date: Tue, 12 Nov 2024 15:40:00 -0500 Subject: non-code --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..3db3cdc --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# rss_dot_php + +A minimal configurable RSS/Atom reader in about 200 lines of PHP. + +This tool isn't intended for standalone reading, instead it's +intended to be used as an aggregator for personal feeds, that can be +embedded into a website via an <iframe>. + +## Usage + +To use this tool, just download the main rss.php file and edit it. +Each entry in the `$feeds` array corresponds to a feed that will be +displayed. The key of the entry is the name. + +The following options are supported per-feed: + +- `$feeds[feed]["url"]`: **REQUIRED**: The URL of the RSS/Atom feed. +- `$feeds[feed]["ttl"]`: How long to cache the feed for, in seconds. Defaults to 1 hour. +- `$feeds[feed]["linkrel"]`: For Atom, which `rel=` value to prefer when getting a link. + +The remaining config options are set on the `$config` array, and are documented inside +the file. + +## Caching + +The cache uses PHP's builtin `serialize`/`unserialize` functions, and stores entries at +`{$config["cache_dir"]}/{md5($feed["url"])}`. Only one cache file will ever exist for +a feed, and it is safe for multiple instances to share a cache directory, even if feed +URLs overlap. -- cgit v1.2.3-54-g00ecf