Source for file cookie_functions.php
Documentation is available at cookie_functions.php
* An open source application development framework for PHP 4.3.2 or newer
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
// ------------------------------------------------------------------------
* CodeIgniter Cookie Helpers
* @author ExpressionEngine Dev Team
* @link http://codeigniter.com/user_guide/helpers/cookie_helper.html
// ------------------------------------------------------------------------
* Accepts six parameter, or you can submit an associative
* array in the first parameter containing all the values.
* @param string the value of the cookie
* @param string the number of seconds until expiration
* @param string the cookie domain. Usually: .yourdomain.com
* @param string the cookie path
* @param string the cookie prefix
function set_cookie($name =
'', $value =
'', $expire =
'', $domain =
'', $path =
'/', $prefix =
'') {
trigger_error('Función set_cookie() no implementada.', E_USER_ERROR);
foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'name') as $item)
// Set the config file options
if ($prefix ==
'' AND $CI->config->item('cookie_prefix') !=
'')
$prefix =
$CI->config->item('cookie_prefix');
if ($domain ==
'' AND $CI->config->item('cookie_domain') !=
'')
$domain =
$CI->config->item('cookie_domain');
if ($path ==
'/' AND $CI->config->item('cookie_path') !=
'/')
$path =
$CI->config->item('cookie_path');
$expire =
time() -
86500;
$expire =
time() +
$expire;
setcookie($prefix.
$name, $value, $expire, $path, $domain, 0);
// --------------------------------------------------------------------
* Fetch an item from the COOKIE array
function get_cookie($index =
'', $xss_clean =
FALSE) {
trigger_error('Función get_cookie() no implementada.', E_USER_ERROR);
return $CI->input->cookie($index, $xss_clean);
// --------------------------------------------------------------------
* @param string the cookie domain. Usually: .yourdomain.com
* @param string the cookie path
* @param string the cookie prefix
function delete_cookie($name =
'', $domain =
'', $path =
'/', $prefix =
'') {
trigger_error('Función delete_cookie() no implementada.', E_USER_ERROR);
set_cookie($name, '', '', $domain, $path, $prefix);
Documentation generated on Tue, 22 Nov 2011 13:28:51 -0200 by phpDocumentor 1.4.3