znanylekarz / ical
This package offers PHP-classes to create iCal compatible *.ics files.
Installs: 166 588
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 169
pkg:composer/znanylekarz/ical
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-09-27 18:07:19 UTC
README
This package offers PHP-classes to create iCal compatible *.ics files.
Usage
1. Create a Calendar object
$vCalendar = new \Eluceo\iCal\Component\Calendar('www.example.com');
2. Create an Event object
$vEvent = new \Eluceo\iCal\Component\Event();
3. Add your information to the Event
$vEvent->setDtStart(new \DateTime('2012-12-24')); $vEvent->setDtEnd(new \DateTime('2012-12-24')); $vEvent->setNoTime(true); $vEvent->setSummary('Christmas');
4. Add Event to Calendar
$vCalendar->addEvent($vEvent);
5. Set HTTP-headers
header('Content-Type: text/calendar; charset=utf-8'); header('Content-Disposition: attachment; filename="cal.ics"');
6. Send output
echo $vCalendar->render();