getCalendarForPrivateURL($icsFile); if($calid === false) die("No calendar with this name known."); // Retrieve calendar contents and serve $stream = $hlp->getCalendarAsICSFeed($calid); header("Content-Type: text/calendar"); header("Content-Transfer-Encoding: Binary"); header("Content-disposition: attachment; filename=\"calendar.ics\""); echo $stream;