virt2/api/php/protokol.php

15 lines
376 B
PHP
Raw Normal View History

if (isset($_SERVER['HTTPS']))
$scheme = $_SERVER['HTTPS'];
else
$scheme = '';
if (($scheme) && ($scheme != 'off')) $scheme = 'https';
else $scheme = 'http';
/*
if ((isset($_SERVER['REQUEST_SCHEME']) AND $_SERVER['REQUEST_SCHEME'] === 'https') OR (isset($_SERVER['HTTPS']) AND $_SERVER['HTTPS'] === 'on'))
$protocol = 'https';
else
$protocol = 'http';
*/