I want to create a file, that will be accessed by using the webcal://
protocol.
The final goal is to let the user subscribe to a shared calendar, and I know that this can be done in a million different ways, and that webcal
has disadvantages, but please treat this question as a technical question about webcal
and don't offer alternatives.
Thx!
Please refer to the RFC5545 shared calendar (ics)n specification https://www.rfc-editor.org/rfc/rfc5545 for the format of contents of the ics calendar files.
Note that webcal is an unofficial apple protocol for ics calendar files. Google and other calendar providers use https for their shared calendars. These can be hosted on most servers. An ics url is literally just a file (or active url). If you persist in using webcal protocol only, some calendar applications may not accept so I strongly suggest the official 'alternative'.
From page 5 of the specification
"The iCalendar format is suitable as an exchange format between
applications or systems. The format is defined in terms of a MIME
content type. This will enable the object to be exchanged using
several transports, including but not limited to SMTP, HTTP,....."