HTTPS SSH

iCalendar generator

SensioLabsInsight

This simple class generate an *.ics file. require php >= 7.0.0

Install with composer

require "calendar/icsfile": "dev-master"

Usage

<?php

require_once 'vendor/autoload.php';

use Ical\Ical;
try {
        $ical = (new Ical())->setAddress('Paris')
                ->setDateStart(new \DateTime('2014-11-21 15:00:00'))
                ->setDateEnd(new \DateTime('2014-11-21 16:00:00'))
                ->setDescription('wonder description')
                ->setSummary('Running')
                ->setOrganizer('foo@bar.fr') //optional
                ->setFilename(uniqid());
            $ical->addHeader();

    echo $ical->getICAL();          

        } catch (\Exception $exc) {
            echo $exc->getMessage();
}