input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly); } } // -------------------------------------------------------------------- if (! function_exists('get_cookie')) { /** * Fetch an item from the COOKIE array * * @param string * @param bool * @return mixed */ function get_cookie($index, $xss_clean = null) { is_bool($xss_clean) or $xss_clean = (config_item('global_xss_filtering') === true); $prefix = isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix'); return get_instance()->input->cookie($prefix . $index, $xss_clean); } } // -------------------------------------------------------------------- if (! function_exists('delete_cookie')) { /** * Delete a COOKIE * * @param mixed * @param string the cookie domain. Usually: .yourdomain.com * @param string the cookie path * @param string the cookie prefix * @return void */ function delete_cookie($name, $domain = '', $path = '/', $prefix = '') { set_cookie($name, '', '', $domain, $path, $prefix); } }