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 = FALSE) { $CI =& get_instance(); $prefix = isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix'); return $CI->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); } } /* End of file cookie_helper.php */ /* Location: ./system/helpers/cookie_helper.php */