Initializing help system before first use

mksetcookie

mksetcookie


Purpose
Generate a set-cookie header line.
Synopsis
function mksetcookie(name:string, value:text, domain:text, path:text, exp:integer):text
Arguments
name 
Cookie name
value 
Associated value
domain 
Domain of the cookie: if it does not start with a dot the domain is interpreted as a host name and the cookie is a host only cookie
path 
Path in the domain
exp 
Expiration time: with a negative value the cookie will be deleted; with 0 the cookie never expires ( session cookie) and a positive value is interpreted as an amount of time in seconds after which the cookie will expire
Return value
A text string of the form "Set-Cookie: name=value\n"
Further information
This function may be used to send cookies to a client by generating a set-cookie header that can be directly appended to the additional headers string of httpreply or httpreplycode. The returned string is terminated by an end of line.
Related topics
Module