日历导出(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

我想为我的网站用户提供导出日历的机会,但我不知道如何 做这个。 p>

我已经阅读了两种不同的方式,.ics文件和网络摄像头。 p>

.ics文件, strong>这个文件他们 必须下载(它是否适用于移动设备)? p>

webcal, strong>我在另一个网站上看到我可以使用webcal订阅一个网址://然后 得到日历信息。 我试图在这个论坛上阅读并谷歌,并发现我可以使用像 http://www.davical.org/ ,但似乎很难,所以我不知道我是否理解它? p>

我曾希望那里 是一种在PHP中自己做的方法,然后为用户提供webcal://地址,但也许这是一个更大的任务? p>

编辑 strong >如果日历的用户在订阅网络摄像头时只需要具有读取权限,那么您可以这样做吗? - a href =“webcal://calendar.ics”> webcal ics link / a? p>

希望有人能让我更清楚: - ) p>

谢谢,Andreas p> div>

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.

yep your webcal link will work, but be aware that webcal is not an officially supported URI, so your mileage will vary. In particular, it doesn't work on Android phones.