ical made with php won't show up in google calendar -


i'm trying create ical calendar created, both using php.

cal url: https://www.gamingonlinux.com/index.php?module=calendar&view=ical

i've used validator, , claims it's valid, no events show in google calendar when added in test.

any thoughts on error is?

this code make ical:

// ical date format. note z on end indicates utc timestamp. define('date_ical', 'ymd\this\z');  // max line length 75 chars. new line \\n  $output = "begin:vcalendar\r\nmethod:publish\r\nversion:2.0\r\nprodid:-//gaming on linux//release calendar//en\r\n";  $db->pquery("select `id`, `date`, `name`, `comment`, `link`, `best_guess` `calendar` year(date) = $year , `approved` = 1 order `date` asc");  // loop on events while ($item = $db->fetch()) {     if (empty($item['edit_date']))     {         $item['edit_date'] = date("y-m-d");     }     $output .=     "begin:vevent\r\nsummary:{$item['name']}\r\nuid:{$item['id']}\r\ndtstart:" . date(date_ical, strtotime($item['date'])) . "\r\ndtend:" . date(date_ical, strtotime($item['date'])) . "\r\nlast-modified:" . date(date_ical, strtotime($item['edit_date'])) . "\r\nend:vevent\r\n"; }  // close calendar $output .= "end:vcalendar";  echo $output; 

turns out missing headers:

header('content-type: text/calendar; charset=utf-8'); header('content-disposition: attachment; filename=calendar.ical'); 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -