public function __construct() { $this->_oSession = new Session(); $oBrowser = new Browser(); $this->_sHttpReferer = $oBrowser->getHttpReferer(); $this->_sUserAgent = $oBrowser->getUserAgent(); unset($oBrowser); }
/** * Affiliates'levels. * * @return boolean */ public static function auth() { $oSession = new Framework\Session\Session(); $oBrowser = new Framework\Navigation\Browser(); $bIsConnect = (int) $oSession->exists('affiliate_id') && $oSession->get('affiliate_ip') === Framework\Ip\Ip::get() && $oSession->get('affiliate_http_user_agent') === $oBrowser->getUserAgent(); /** Destruction of the object and minimize CPU resources **/ unset($oSession, $oBrowser); return $bIsConnect; }
public function __construct() { $oBrowser = new Browser(); $this->_sUserAgent = $oBrowser->getUserAgent(); $this->_sReferer = $oBrowser->getHttpReferer(); $this->_sUserLang = $oBrowser->getLanguage(); unset($oBrowser); $this->init(); }
/** * Users'levels. * * @return boolean */ public static function auth() { $oSession = new Session(); $oBrowser = new Browser(); $bIsConnect = (int) $oSession->exists('member_id') && $oSession->get('member_ip') === Ip::get() && $oSession->get('member_http_user_agent') === $oBrowser->getUserAgent(); /** Destruction of the object and minimize CPU resources **/ unset($oSession, $oBrowser); return $bIsConnect; }