phpcalendaricalendarwebcal

Calendar export (Webcal)


I would like to give users of my website the opportunity to export their calendar, but I'm not sure how to do this.

I have read about two differents way, .ics file and webcal.

.ics file, this file they have to download (does it work on mobiledevices)?

webcal, i saw on another website that I could subscribe to an url with webcal:// and then get the calendar informations. I have tried to read on it on this forum and google it, and found out that I could use a tool like http://www.davical.org/, but it seems quite hard, so I don't know if I understands it right?

I had hoped there was a way to just do it yourself in php, and then offer the users the webcal:// address, but maybe it is a way bigger task?

Edit If the users of the calendar only have to have read access when they subscribes to the webcal, can you then just do it like this? - a href="webcal://calendar.ics">webcal ics link/a?

Hopes someone can make it more clear for me:-)

Thanks, Andreas


Solution

  • It seems like that I can just make a .ics file like this in this tutorial - https://gist.github.com/jakebellacera/635416. And then i can call this .ics file like this.

    <a href="webcal://domain.com/calendar.php">calendar</a>
    

    I dont know if it's the right way to do it, but it seems like it works for me.