. */ $proxy_url = "https://dualical.ba-horb.de:8443/dhbwcalendar/ics"; $curl_handler = curl_init($proxy_url); curl_setopt($curl_handler, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl_handler, CURLOPT_BINARYTRANSFER, true); curl_setopt($curl_handler, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($curl_handler, CURLOPT_WRITEFUNCTION, 'readResponse'); curl_setopt($curl_handler, CURLOPT_HEADERFUNCTION, 'readHeaders'); curl_setopt($curl_handler, CURLOPT_SSLVERSION, 3); curl_setopt($curl_handler, CURLOPT_CAINFO, getcwd() . "/ics_certificate.pem"); curl_setopt($curl_handler, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($curl_handler, CURLOPT_VERBOSE, 0); function readResponse(&$curl, $string) { echo $string; return strlen($string); } function readHeaders(&$curl, $string) { $length = strlen($string); if ($string !== "\r\n") { header(rtrim($string)); } return $length; } $headers = apache_request_headers(); $client_headers = array(); foreach ($headers as $header => $value) { switch($header) { case 'Host': break; default: $client_headers[] = sprintf('%s: %s', $header, $value); break; } } curl_setopt($curl_handler, CURLOPT_HTTPHEADER, $client_headers); curl_exec($curl_handler); //echo print_r(curl_getinfo($curl_handler), true); ?>