PHP script: download ics file

I am setting up an "export as ics" (iCal) feature for our weekly school curriculum. The download program works, but when I open it in iCal (Mac OS X) iCal informs me that the calendar is invalid. I opened the file in a text editor and it looks good to me.

I suspect my download.php script is wrong or is setting the wrong mimetype.

I've tried text

and text/calendar

. Bad luck.

So my question is this: what's the correct mimetype for ics files?

+2


source to share


3 answers


ICalendar data is of text / calendar MIME content type.

Wikipedia



If you save it by loading it, I doubt the problem is: check your data, encoding, line endings ...

+3


source


text/calendar

      

From RFC 2447 iCalendar Message-Based Interaction Protocol :



2.1 MIME Media Type

A MIME object containing content information formatted in accordance with
this document will be referred to as a Text / Calendar Content Type. it is assumed that this type of content will be transported via MIME email transport.

+1


source


It might be useful for others by its iCal validator - http://severinghaus.org/projects/icv /

0


source







All Articles