This post was originally written several years ago and included my own attempt at building a very simple ical creator in PHP. I've been meaning to update this blog with some better code and information for quite some time. I finally found what I consider to be a very good class for creating iCalendar files using PHP: iCalcreator. Along with creating iCalendar files, iCalcreator can also parse and merge iCalendar files, and spit out a modified version. There are lots of examples available for download on their site, as well as supporting utilities.
The iCalcreator documentation is excellent. The examples are easy to follow, and they clearly document how to use their class. Unfortunately, the iCalendar specification is complicated enough that you'll still need to read rfc2445 to really take advantage of all of the options available to you. Some good iCalendar reference sites include:
Since I haven't actually built anything using iCalcreator yet (other than some quick test scripts earlier today) I can't really answer any questions about its usage. The good news is they have a forum on sourceforge for questions. I'd love to hear about your experiences using iCalcreator, so feel free to leave your comments below.