Sometimes the .ics file doesn't give access unless you behave like a browser. It works to replace line 106
$data = file_get_contents($file);
with something like the following:
$options = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"Cookie: foo=bar\r\n" . // check function.stream-context-create on php.net
"User-Agent: CalFileParser/1.0"
)
);
$context = stream_context_create($options);
$data = file_get_contents($file, false, $context);