a PHP file that generate a RSS 2.0 feed based on content stored in a MySQL database.
Copyright (C) 2017 Clément Février
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
MySQLiToRSS is a PHP file that generate a RSS 2.0 feed based
on content stored in a MySQL database.
It is licensed under GPLv3.
It handles sorting by date, the use of HTML in the
description of an item, which allow to render the article as
it appears in the feed reader, excepted for the CSS sheets,
and multitag articles.
It is based on Version 2.0.11 of the RSS 2.0 specification,
the most up to date at the time of writing this software.
Some optional items are missing because I do not use them.
I might add them later (some or all).
I will be pleased to add optional items if requested.
1/ Clone the git repository.
You first need git.
% sudo apt install git
Then, you need to clone the git repository
% git clone https://clementfevrier.fr/git/MySQLiToRSS.git
% cd MySQLiToRSS
2/ Copy or move the file
% cp rss/index.php.dist rss/index.php
3/ Edit the file
rss/index.php and adjust the variables
according to your blog's informations and database structure.
This is the only required step.
% vi rss/index.php
4/ Copy, move or link the folder to the root of your website
for a better looking feed URL, for example to have
% cd /var/www/html
% ln -s MySQLiToRSS/rss .
5/ Advertise your RSS feed in the webpages of your website to
let web browsers know about its existence.
In the header of your webpages, add the following line
<link rel="alternate" type="application/rss+xml" href="/rss/" title="RSS">
And you can also add a visible link inside your webpages by
adding the line
<a type="application/rss+xml" href="/rss/">
<img src="/images/Feed-icon.svg" alt="RSS" title="RSS">
Do not forget to adjust the
to your case.