['timeout' => 5, 'ignore_errors' => true]]); $data = @file_get_contents($url, false, $ctx); if ($data === false) { http_response_code(502); exit; } header('Content-Type: text/calendar; charset=utf-8'); header('Cache-Control: public, max-age=300'); echo $data;