This was hard to find, so I want to share a little script for automatically generating an RSS 2.0 feed for files (with a particular extension) in a server directory. For example, you may have a set of photos, videos, or audio files that you want to share! Here are steps for customizing it for your server:
- Create a directory, and add your files
- Download the script
- Change the $allowed_ext variable to include extensions of files you want to include in the feed
- Change the $feedName, $feedDesc, $feedURL, and $feedBaseURL to your server paths
- Drop the file in your http://www.mysite/directory
- Navigate to http://www.mysite/directory to see the feed’s xml
Done! Now you can subscribe via your favorite RSS service, or check that your feed is valid.
Suggested Citation:
Sochat, Vanessa. "Generate RSS 2.0 Feed for Files in Directory." @vsoch (blog), 29 Apr 2014, https://vsoch.github.io/2014/generate-rss-2-0-feed-for-files-in-directory/ (accessed 22 Dec 24).