1. sanchez luc
  2. iCalendar generator

Overview

HTTPS SSH

iCalendar generator

SensioLabsInsight

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

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('2014-11-21 15:00:00')
                ->setDateEnd('2014-11-21 16:00:00')
                ->setDescription('wonder description')
                ->setSummary('Running')
                ->setFilename(uniqid());
        $ical->addHeader();

    echo $ical->getICAL();          

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