glennda Posted March 20, 2011 Posted March 20, 2011 (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 March 20, 2011 by glennda
webman Posted March 20, 2011 Posted March 20, 2011 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 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now