Hi
All iCalendar data is stored in a PHP object tree. This allows any property to be added to the iCalendar feed without requiring specialized library function calls. Missing or invalid properties can cause the resulting iCalendar file to be invalid. Visit iCalendar.org to view valid properties and test your feed using the site’s iCalendar validator tool.
Here is an example of a PHP program to create a single event iCalendar file:
curnode);
// add title
$eventobj->addNode(new ZCiCalDataNode(“SUMMARY:” . $title));
// add start date
$eventobj->addNode(new ZCiCalDataNode(“DTSTART:” . ZCiCal::fromSqlDateTime($event_start)));
// add end date
$eventobj->addNode(new ZCiCalDataNode(“DTEND:” . ZCiCal::fromSqlDateTime($event_end)));
// UID is a required item in VEVENT, create unique string for this event
// Adding your domain to the end is a good way of creating uniqueness
$uid = date(‘Y-m-d-H-i-s’) . “@demo.icalendar.org”;
$eventobj->addNode(new ZCiCalDataNode(“UID:” . $uid));
// DTSTAMP is a required item in VEVENT
$eventobj->addNode(new ZCiCalDataNode(“DTSTAMP:” . ZCiCal::fromSqlDateTime()));