Bitrix Site Manager

CMain::get

CMain::get_cookie(
 string name, 
 mixed name_prefix = false
)

The method get returns the value of a cookie.

Parameters

ParameterDescription
name Name of the cookie.
name_prefix Prefix used with the cookie name. 
Optional. By default, this parameters is set to the value of the parameter Cookie name prefix in the setting of the Kernel module. You can obtain the value by making the call:
COption::GetOptionString("main", "cookie_name", "BITRIX_SM")

See Also

Example



<?
global $APPLICATION;
$VISITOR_ID = $APPLICATION->get_cookie("VISITOR_ID");
?>