1. Go to this page and download the library: Download phpfui/icalendar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phpfui / icalendar example snippets
$icalobj = new \ICalendarOrg\ZCiCal();
$eventobj = new \ICalendarOrg\ZCiCalNode("VEVENT", $icalobj->curnode);
// add start date
$eventobj->addNode(new \ICalendarOrg\ZCiCalDataNode("DTSTART:" . \ICalendarOrg\ZDateHelper::fromSqlDateTime("2020-01-01 12:00:00")));
// add end date
$eventobj->addNode(new \ICalendarOrg\ZCiCalDataNode("DTEND:" . \ICalendarOrg\ZDateHelper::fromSqlDateTime("2020-01-01 13:00:00")));
echo $icalobj->export();
$icalobj = new \ICalendarOrg\ZCiCal();
$eventobj1 = new \ICalendarOrg\ZCiCalNode("VEVENT", $icalobj->curnode);
$eventobj1->addNode(new \ICalendarOrg\ZCiCalDataNode("SUMMARY:Event 1"));
...
$eventobj2 = new \ICalendarOrg\ZCiCalNode("VEVENT", $icalobj->curnode);
$eventobj2->addNode(new \ICalendarOrg\ZCiCalDataNode("SUMMARY:Event 2"));
...