Bitrix Site Manager

CMain::IsHTTPS

bool
CMain::IsHTTPS()

The method IsHTTPS determines if the current protocol is secured (HTTPS).

Parameters

No parameters.

Example



<?
global $APPLICATION;
// get the full URI of the current page 
$CURRENT_PAGE = (CMain::IsHTTPS()) ? "https://" : "http://";
$CURRENT_PAGE .= $_SERVER["HTTP_HOST"];
$CURRENT_PAGE .= $APPLICATION->GetCurUri();
// $CURRENT_PAGE may contain 
// "http://www.mysite.com/en/index.php?id=23"
?>