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'; */