Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webcal:// Format - Export to Google Calendar/iCal

I've a home-made php based web calendar which I would like my users to import into Google Calendar, iCal, etc. so they have up-to-date information available on their calendar of choice. I understand providing a webcal link is the way to go but I am not sure how to create it. I've donwloaded an example .ics file but did not have much info..

Where can I find more info on creating a webcal feed? Also, does webcal allow authentication? The feed will most likely be password protected.

Thanks!

like image 387
elle Avatar asked Oct 08 '11 00:10

elle


1 Answers

A webcal feed use iCalendar format as defined in RFC 5545. It's a rather complex and cumbersome format. You'll find simple examples on wikipedia which may fit your needs. You could also opt to use a library to abstract the format, such as:

  • http://framework.zend.com/svn/framework/laboratory/Zend_Ical/
  • http://bennu.sourceforge.net/
  • http://sourceforge.net/projects/icalcreator/
  • http://sabre.io/vobject/

From all of these the last one might be your best bet (all others seemed to be dead last time I checked).

As for authentication you may use basic HTTP authentication. Or use a secret token to identify the user (as seen in Google Calendar). Anyway, in both cases you probably should use secure connection (SSL) so data (and passwords) are not sent in clear.

And finally I would recommend the use of webcal:// or webcals:// scheme for ease of use for end-user. But you may face troubles with some clients (eg: Outlook 2007 and forced SSL). I don't have a work-for-all solution yet...

EDIT

I forgot to mention the ICS validator in case you don't use a lib .

like image 72
PowerKiKi Avatar answered Oct 20 '22 07:10

PowerKiKi