• Pages
  • About
  • Data Privacy Clip
  • Pictures – Fishing
Open Source|Tweaks|Web Development|Wordpress Tips and Tricks

Embed RSS feeds using PHP on Website – Calendar Display –

On the district website http://www.dist228.org and the high school website http://www.dist228.org/index.php?page=hs/index.html – There are sections of the page where I have replaced the text with self updating information based on RSS 2.0 Feeds.¬¨‚Ć The concept is simply so that the data in the fields will auto update when the user posts to their own website making it easier to get info on the main page quickly.¬¨‚Ć In the case of the High School page I have modified this approach slightly and made it so a RSS feed of three combined ICS (Created on ICAl) calendars appears for the current day.¬¨‚Ć Since Parsing three large ICS files is time consuming I have this Calendar RSS feed cached locally on the hour (will probably change to a 1 day interval).¬¨‚Ć The effect is nice and in the long run time saving – allowing users who maintain the calendars or administrators who make messages to simply continue in their usual fashion and have the data auto update.

In the screenshot below I circled the two regions that are actually just displayed RSS feeds.¬¨‚Ć With the Today’s Events Calendar I am using the same concept but decided to use an iFrame and make the php script a separate file – no real reason for this and may change it back to a call from within the existing php file.

Many of the Staff at Geneseo CUSD 228 have locally hosted websites that use the WordPress engine – one nice feature of using wordpress is that the site is already structured around an RSS 2.0 feed.¬¨‚Ć Using a php RSS parsing script makes it easy to capture this information – the effect kind of a self-updating widget.

No need to reinvent the wheel on using PHP to capture or display RSS.¬¨‚Ć Looking around on the web I cam across the RSSLIB – which contains a series of php scripts that handle most of the functions you can think of.¬¨‚Ć For the most part I just cut code out of these files RSSCache.php and RSSlib.php to embed the functionality on the website.

You can download the rsslib php files here

Embedding the Today’s events calendar was a little more complicated since the files are actually all ICS Calendar files created in iCal.¬¨‚Ć Here I have the calendars published to a local webdav server and then I have setup a PHP calendar site that parses and views these files.¬¨‚Ć To view the ICS calendars on the web I used the http://phpicalendar.net/ beta build as a template and modified it for our purposes.¬¨‚Ć Phpicalendar is able to remotely view a webdav hosted ICS file and further parse the data and construct a RSS feed from this data.¬¨‚Ć This is excellent since using phpicalendar’s RSS Viewer and combining them with our 3 main HS calendars works perfectly except for time.¬¨‚Ć Since these calendars are large it takes the PHP engine awhile to process – here is where I rely on the RSSLIB’s RSS cache script.¬¨‚Ć RSScache simply creates a php dummy file of the most recent combined RSS feed and then holds it for an hour (will change to 12 hour or day soon).¬¨‚Ć This speeds up the page loading time tremendously.

Here is a snippet of code used to view cached version of RSS feed.

(Update:¬¨‚Ć I actually changed the “G” with a “d” so that it looks at the day instead of the hour when deciding to update cache this change adjusts the cache file every 24 hours instead of every 60 minutes)

March 11, 2011

Until now no comments

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Recent Posts

    • Screen Recording with FaceTime Camera
    • Record Your Lesson / Google Chrome Extension / Screen Recorder
    • Using Apple’s Quicktime to Screen Record
    • Roomba Repair – Replacing Treads with Silicon Fund-Raising Bracelets
    • Smush it and Speed
    • Apple and The Curious Tale of Chicktionary
    • DeployStudio and MacOS High Sierra 10.13
    • Sysprep an Upgrade Windows 7 Machine
  • Categories

    • Active Directory
    • Alaska Fishing
    • All Things Google
    • All things IOS
    • Android
    • Apple and All Things Mac
    • Appliance Repair
    • Boxee
    • Chromebooks
    • Cisco Networking
    • Cloud
    • Computer Repair
    • Education
    • Educational Technology
    • Geneseo CUSD Network
    • Google
    • Google Analytics
    • Iphone Development
    • Kerio
    • Linux
    • Microsoft Windows and All Things PC
    • Misc. Repair
    • Netbooks
    • Networking
    • New Technology
    • Open Source
    • Podcast Producer – GCSD Podcasts
    • Printer Repair
    • Programming
    • Serial Terminals
    • Skyward
    • Squid
    • Streaming Radio
    • SunRay
    • Tech Teaching Tools
    • TV Repair
    • Tweaks
    • Uncategorized
    • Upgrades
    • Video Conferencing and IChat
    • VirtualBox
    • Web Development
    • Wordpress Tips and Tricks
  • RSS Roodhouse Tech Podcasts

  • RSS Roodhouse Tech Blog RSS feed

  • Archives

    • August 2020
    • July 2020
    • March 2020
    • September 2019
    • January 2019
    • September 2017
    • July 2017
    • May 2017
    • April 2017
    • February 2017
    • January 2017
    • September 2016
    • August 2016
    • May 2016
    • April 2016
    • February 2016
    • January 2016
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • June 2015
    • January 2015
    • December 2014
    • November 2014
    • September 2014
    • August 2014
    • July 2014
    • June 2014
    • May 2014
    • March 2014
    • February 2014
    • January 2014
    • December 2013
    • November 2013
    • October 2013
    • September 2013
    • August 2013
    • July 2013
    • June 2013
    • May 2013
    • April 2013
    • March 2013
    • February 2013
    • January 2013
    • December 2012
    • November 2012
    • August 2012
    • June 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
  • June 2025
    M T W T F S S
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    30  
    « Aug    
  • Pages

    • About
    • Data Privacy Clip
    • Pictures – Fishing
    • AUTO
    • S
    • M
    • L
    • Widerruf leasingvertrag sixt
    • Werden wir uns Vertragen test
    • Was kostet iphone x mit Vertrag vodafone
    • Wann ist ein bausparvertrag zuteilungsreif debeka
    • Vodafone Vertrag günstig
    • Vl Vertrag steuerfrei
    • Vertragsmanagement freeware
    • Tu Vertrag kbob
    • Testament Muster ohne kinder
    • Kooperationsvertrag leistungsaustausch
    • Handy Vertrag auf türkisch
    • Telekom Vertrag kündigen anschrift
    • Telekom günstiger handyvertrag
    • Tarifvertrag zeitarbeitsfirmen kündigungsfristen
    • Tarifvertrag tfa schleswig holstein
    • Tarifvertrag mfa westfalen lippe
    • Tarifvertrag internationaler bund tabelle
    • Tarifvertrag gehalt genossenschaftsbanken
    • Lt pdf
    • Tarifvertrag brandenburg metall