[kronolith] Howto use the kronolith API

Ferdinand Gruber fer.grub at yahoo.de
Sat Feb 6 11:50:07 UTC 2021


Hi,

please can anyone give me a simple example how to use the kronolith API 
in my own PHP project.

I have been using the script kronolith-import-icals.php in a PHP project 
for a long time to import events from a separate form into my kronolith 
calendar.

This is what the ICS file looks like that I am currently using

     $ical =
         "BEGIN:VCALENDAR".$eol.
         "VERSION:2.0".$eol.
         "BEGIN:VEVENT".$eol.
         "DTSTART;TZID=Europe/Vienna:".$event_start.$eol.
         "DTEND;TZID=Europe/Vienna:".$event_end.$eol.
         "DTSTAMP:".time().$eol.
         "UID:".$event_uid.$eol.
         "SUMMARY:".$event_title.$eol.
         "DESCRIPTION:".str_replace("\r\n", "\\n", $event_description).$eol.
         "LOCATION:".$event_location.$eol.
         "CLASS:PUBLIC".$eol.
         "END:VEVENT".$eol.
         "END:VCALENDAR".$eol;

The variables are generated from$_POST.

I use to this script with PHP in this way:

$output = shell_exec("php 
/srv/www/htdocs/horde/kronolith/bin/_kronolith-import-icals.php 
'".$calendar_id."' '".$user."' '".$pw."' '".$ical."'");

This way I am able to write data into the kronolith Calendar. But I 
suppose that this is not really a good approach ...

How can I write data into my kronolith calendar using the kronolith API?

Some little hints would help me.

Many thanks in advance.

-- 
Regards from Austria
Ferdinand Gruber



More information about the kronolith mailing list