Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted (edited)

Does anybody have a script for creating an rss feed from a mysql databsae?

 

having created a noticeboard staff can submit to i would like to be able to create an rss feed from it (scheduled cron job maybe) then have our Xibo boxes display the RSS feed.

 

EDIT: can a mod put PHP infront of this please!

Edited by glennda
Posted

It should be pretty straight-forward. Cron isn't needed if you point Xibo at a PHP file that simply outputs the RSS dynamically-generated from the DB.

 

You just need to retrieve some articles from the DB, and instead of displaying them in HTML format like you might do already, just output the correct XML tags and HTTP header.

 

Here's something to get you started.

 

// Correct RSS XML header
header("Content-Type: application/rss+xml");
// get your items from the DB (replace with your own code to get stuff from DB)
$notices = get_from_db();

echo '' . "\n";
?>


   Staff notices
   Staff notice board messages
   http://server/noticeboard

   
   
       
       
       http://server/noticeboard/view.php
       
       
   
   


  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...