[ 'timeout' => 10, 'ignore_errors' => true, 'header' => "User-Agent: PACS-Proxy\r\n" ], 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false ] ]; $context = stream_context_create($opts); $response = @file_get_contents($backend, false, $context); // Gauti HTTP antraštes if (isset($http_response_header)) { foreach ($http_response_header as $h) { if (stripos($h, 'Content-Type:') === 0) { header($h); } } } if ($response === false) { http_response_code(503); echo "

PACS sistema laikinai nepasiekiama

"; } else { echo $response; } ?>