Code: Select all
<?php
// an event that takes place in the park from 10-11am on August 15th, 2009 (US-Eastern time)
$event = new qCal_Component_Vevent(array(
new qCal_Property_Dtstart('20090815T100000', array('tzid' => 'US-Eastern')),
new qCal_Property_Dtend('20090815T110000'), array('tzid' => 'US-Eastern')),
'summary' => 'A picnic',
'description' => 'A picnic in the park',
'location' => 'The Park'
));
Code: Select all
$cal = new qCal_Component_Vcalendar(array(
'prodid' => '-//Some Product That Makes iCalendar Files//somehost@host.com',
'method' => 'PUBLISH'
));
$cal->attach($event);Code: Select all
$timezone = new qCal_Component_Vtimezone(array(
'tzid' => 'US-Eastern',
// timezone properties here...
));
$cal->attach($timezone);Code: Select all
$alarm = new qCal_Component_Valarm(array(
new qCal_Property_Trigger('20090815T100000', array('tzid' => 'US-Eastern')),
'action' => 'audio',
'attach' => 'http://www.example.com/sounds/alarm.wav',
));
$event->attach($alarm);