iCalendars Library for PHP
useEluceo\Ical\Component\Calendar;useEluceo\Ical\Component\Event;$vCalendar = new Calendar('www.example.com');$vCalendar->setName('Example Calendar');$vCalendar->setTimezone('America/New_York');$vEvent = new Event();$vEvent ->setDtStart(new \DateTime('2012-12-24')) ->setDtEnd(new \DateTime('2012-12-24')) ->setNoTime(True) ->setSummary('Christmas');$vCalendar->addComponent($vEvent);header('Content-Type: text/calendar; charset=utf-8');header('Content-Disposition: attachment; filename="cal.ics".);Echo $vCalendar->render();

The library supports the following iCalendar components:

  • VCALENDAR
  • VEVENT
  • VALARM
  • VTIMEZONE

Example of connecting to a calendar after you add it to your app:

<a  href=> webcal://www.example.com/holidays.ics">Subscribe (iCal)   

Markuspoerschke / iCal You can learn more about this package on GitHub, get all the installation instructions, and view the source code .

  Quote

KARABAY A, 2020 . iCalendars Library for PHP,

https://www.karabayyazilim.com/blog/php/php-icin-icalendars-kutuphanesi-2020-01-21-221929

(Accessed January 21, 2020).


  Share this post

Comments (0)

Comment

Subscribe
Sign up for the email newsletter to be the first to know about my blog posts