Class

HTTPCookie

Package: IO\HTTP Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Regis VIARRE crowkait@phpboost.com Version: PHPBoost 5.2 - last update: 2016 10 24 Since: PHPBoost 3.0 - 2010 01 27 Contributor: Julien BRISWALTER j1.seth@phpboost.com Contributor: Arnaud GENET elenwii@phpboost.com Located at: io/http/HTTPCookie.class.php

Manages cookies via the HTTP protocol

Methods summary
public
# __construct( $name, $value, $timestamp = null )
public
# set_expiration_date( integer $timestamp )

The time the cookie expires. This is a Unix timestamp so is in number of seconds since the epoch. In other words, you'll most likely set this with the time function plus the number of seconds before you want it to expire.

public
# set_path( string $path )

The path on the server in which the cookie will be available on. If set to '/' (default value), the cookie will be available within the entire domain.

public
# set_domain( string $domain )

The domain that the cookie is available.

public
# set_secure( boolean $secure )

Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client. When set to true, the cookie will only be set if a secure connection exists. The default is false. On the server-side, it's on the programmer to send this kind of cookie only on secure connection (e.g. with respect to $_SERVER["HTTPS"]).

public
# set_httponly( boolean $httponly )

When true the cookie will be made accessible only through the HTTP protocol. This means that the cookie won't be accessible by scripting languages, such as JavaScript. This setting can effectively help to reduce identity theft through XSS attacks (although it is not supported by all browsers). Added in PHP 5.2.0.

public
# get_name( )
public
public
public
# get_path( )
public
public
public