davidgagne.net

  • About
  • Archives
  • Twitter
  • Facebook
  • bartender.live
  • GitHub
  • LinkedIn

2008 – 2009 iCal College Bowl Schedule

December 17th, 2008 @ 11:42 am PST

In which I explain how to create an iCal version of the college football bowl season schedule

2008 – 2009 iCal College Bowl Schedule

Update: Visit collegefootballcalendar.net to subscribe to the latest college football bowl schedule!

CalendarI couldn’t find one anywhere at Yahoo! Sports or on ESPN, so I did some hacking and put together an iCal version of the 2008-2009 College Football Bowl Schedule. You should be able to click that link to “subscribe” to the calendar, which will add all 34 of this season’s bowl games to your iCal or Outlook calendar.

How did I do it?

It was pretty simple, actually, although it took a lot of copying and pasting.

First I created a table in a MySQL database with fields for the name of the bowl, the teams, the city and stadium, and the date and time of each game. Then I created a PHP form so I could add the games to the table. (I had to copy/paste about (34 * 7) times from the ESPN schedule.)
The next step was to add a handler to the .htaccess file in the directory where the .ics file is stored to tell PHP to parse it as if it contained code (instead of just serving it as a web page.)

AddHandler application/x-httpd-php .ics

It took me a couple of tries to get the formatting correct, but eventually I managed to get the PHP right to print each game with the correct details:

<?
     // the header directive tells the web server to tell your browser that this is a calendar file and not a regular web page
	header('Content-type: text/calendar');
	
	$bowls = $db->get_results("select * from bowl");
	
	echo "BEGIN:VCALENDAR";
	echo "\nVERSION:2.0";
	echo "\nMETHOD:PUBLISH";
	echo "\nX-WR-CALNAME:2008-2009 Bowl Calendar (NCAA Football)";
	echo "\nPRODID:-//davidgagne.net//2008-2009 Bowl Calendar (NCAA Football)//EN";

	foreach ( $bowls as $b){
		echo "\nBEGIN:VEVENT";
		echo "\nDTSTART;TZID=US/Eastern:" . date("Ymd", strtotime($b->eventstart)) . "T{$b->eventtime}00";
		echo "\nDTEND;TZID=US/Eastern:" . date("Ymd", strtotime($b->eventstart)) . "T" . ($b->eventtime + 300) . "00";
		echo "\nSUMMARY:{$b->teams} ({$b->bowl})";
		echo "\nLOCATION:{$b->city} ({$b->stadium})";
		echo "\nUID:2008-2009 Bowl Calendar (NCAA Football){$b->bowlid}@davidgagne.net";
		echo "\nSEQUENCE:0";
		echo "\nDESCRIPTION:";
		echo "\nDURATION:PT3H0M";
		echo "\nEND:VEVENT";
	}

	echo "\nEND:VCALENDAR";
?>

I executed that on my web server and then just saved the results as a text file. I opened the file in my iCal to make sure everything worked, and then saved and posted it to this site as an ics file.

There you go. Have fun.

More posts tagged:
bowl games / calendar / college football / development / iCal / Outlook / PHP / sports / webcal

More posts categorized:
College Football

More posts from:
December 2008 / 2008

Post navigation

Previous Post
Previous Post J.Crew Follies
Next Post
Next Post Faith Unrewarded

Responses to “2008 – 2009 iCal College Bowl Schedule”

  1. December 17th, 2008 @ 2:38 pm
    JJ

    What am I doing wrong? See error text from Outlook import

    This error can appear if you have attempted to save a recurring Lunar appointment in iCalendar format.
    To avoid this error, set the appointment option to Gregorian instead of Lunar.

  2. December 17th, 2008 @ 4:39 pm
    JJ

    worked great from Google calendar this time. Thanks much!

  3. December 17th, 2008 @ 6:40 pm
    John McMahon

    Thanks, works great. I’ve been searching for this calendar on iCalshare (http://icalshare.com/). You should register it on that site.

  4. December 21st, 2008 @ 1:21 pm
    gf

    I’ve been looking for something like this. Thanks for taking the time to develop it. It works perfectly in iCal!

  5. December 23rd, 2008 @ 6:13 am
    Don

    Thanks man.. I appreciate it!

  6. December 24th, 2008 @ 11:29 am
    Mike

    You are the man, worked great!!!! Now I can sink it with my blackberry.

  7. March 19th, 2009 @ 8:08 am
    miller

    do you know where i could get the UF baseball schedule for outlook or google cal?

  8. March 19th, 2009 @ 8:27 am
    dvg

    The UF baseball schedule is posted here:
    http://www.gatorzone.com/sched.php?sport=baseb

    There’s a link to import to Outlook at the top of the page.

  9. December 5th, 2012 @ 7:53 am
    ET

    Could you do this for the 2012-2013 schedule PLEASE!!!!!!!

  10. December 9th, 2012 @ 12:44 am
    dvg

    I’ve added the 2012-2013 schedule.

    webcal://www.davidgagne.net/temp/bowl.ics

Comments Closed

New comments are disabled on this post.

Search


If credit card debt or student loan payments are killing you, I highly recommend taking a look at SoFi. Their low rates and incredibly quick and simple application process might be just what you need.

  • Take Control of Your Debt

© David Vincent Gagne. All rights reserved. Custom WordPress Theme by Jacket Industries.