Name
setrawcookie
Synopsis
void setrawcookie(stringname[, stringvalue[, intexpiration[, stringpath[, stringdomain[, boolis_secure]]]]])
Generates a cookie and passes it along with the rest of the
header information. Because cookies are set in the HTTP header,
setcookie() must be called before
any output is generated.
If only name is specified, the cookie
with that name is deleted from the client. The
value argument specifies a value for the
cookie to take—unlike setcookie(),
the value specified here is not URL encoded before being sent,
expiration is a Unix timestamp value
defining a time the cookie should expire, and the
path and domain
parameters define a domain for the cookie to be associated with. If
is_secure is true, the cookie will be transmitted only
over a secure HTTP connection.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access