We are running WordPress, where a very old script reads the URL of an iCal calendar:
$webcal = 'http://pXX-calendars.icloud.com/published/2/verylongstring';
if(!$data = file_get_contents($webcal, false, stream_context_create(array('ssl' => array('verify_peer' => false, 'verify_peer_name' => false))))) {
echo "<!-- could not read calendar -->\n\r";
}
Recently this fails, and I don't know why.
A year ago I have changed the file_get_contents() from
file_get_contents($webcal)
to
file_get_contents($webcal, false, stream_context_create(array('ssl' => array('verify_peer' => false, 'verify_peer_name' => false)))))
because reading failed, and after the change it worked again.
We are getting an 502 Bad Gateway Error when we enter the $webcal URL into the browser.
Maybe Apple has changed something (like authentication or else)?
What happened and how can we solve this?