1

I have one application used to record appointments, so many users have different appointments scheduled in the calendar.

I want to synchronize all the appointments of each user with the different calendars used by users. Every user have different calendar appointments and different calendar like google, outlook, apple, yahoo etc.

How can I synchronize application calendar with users calendar in php/codeigniter?

Jay
  • 821
  • 2
  • 18
  • 50

1 Answers1

0

CalDAV is a standard protocol defined by RFC 4791 and it's supported by Google Calendar, Apple Calendar (previously called iCal), Yahoo! Calendar, and a few others (possibly with limited support or via plugins). This protocol uses the .ics (iCal) file format. This can be published via a URL so that it will stay up-to-date automatically (see How can I use PHP to dynamically publish an ical file to be read by Google Calendar?). So as users create/update/delete appointments in your system, you would dynamically publish the .ics file/URL to keep their calendar client up-to-date.

Because each calendar system has its own quirks, it can be pretty tricky (I know because I've done something similar in PHP). You must rely on them to have a decent API for this. Also, I think the user must manually import/subscribe to the calendar file/URL you create.

Outlook example: http://windows.microsoft.com/en-us/windows/outlook/calendar-import-vs-subscribe

Google example: https://support.google.com/calendar/answer/37118?hl=en&rd=2

I think Google also lets you sync via "calendar addresses" or application-specific passwords for 3rd-party apps: https://support.google.com/calendar/answer/37648?vid=0-635763762452997489-1595326527

Community
  • 1
  • 1
Ian Drake
  • 737
  • 4
  • 7