2, // Default value
'defaultTimeZone' => 'UTC',
'defaultWeekStart' => 'MO', // Default value
'disableCharacterReplacement' => false, // Default value
'filterDaysAfter' => null, // Default value
'filterDaysBefore' => null, // Default value
'skipRecurrence' => false, // Default value
));
// $ical->initFile('ICal.ics');
// $ical->initUrl('https://raw.githubusercontent.com/u01jmg3/ics-parser/master/examples/ICal.ics', $username = null, $password = null, $userAgent = null);
} catch (\Exception $e) {
die($e);
}
?>
PHP ICS Parser example
PHP ICS Parser example
-
eventCount ?>
The number of events
-
freeBusyCount ?>
The number of free/busy time slots
-
todoCount ?>
The number of todos
-
alarmCount ?>
The number of alarms
true,
'range' => true,
'all' => true,
);
?>
eventsFromInterval('1 week');
if ($events) {
echo '
Events in the next 7 days:
';
}
$count = 1;
?>
iCalDateToDateTime($event->dtstart_array[3]);
echo $event->summary . ' (' . $dtstart->format('d-m-Y H:i') . ')';
?>
printData() ?>
1 && $count % 3 === 0) {
echo '
';
}
$count++;
?>
eventsFromRange('2017-03-01 12:00:00', '2017-04-31 17:00:00');
if ($events) {
echo '
Events March through April:
';
}
$count = 1;
?>
iCalDateToDateTime($event->dtstart_array[3]);
echo $event->summary . ' (' . $dtstart->format('d-m-Y H:i') . ')';
?>
printData() ?>
1 && $count % 3 === 0) {
echo '
';
}
$count++;
?>
sortEventsWithOrder($ical->events());
if ($events) {
echo '
All Events:
';
}
?>
iCalDateToDateTime($event->dtstart_array[3]);
echo $event->summary . ' (' . $dtstart->format('d-m-Y H:i') . ')';
?>
printData() ?>
1 && $count % 3 === 0) {
echo '
';
}
$count++;
?>