-
A cookie for the current server, that expires when the user quits the browser
Set-cookie: color=red
Content-type: text/html
-
A cookie for the current server, that has an expiration data.
Set-cookie: color=red; expires=Friday, 03-April-98 13:34:20 GMT
Content-type: text/html
-
A cookie that is for only a particular path
Set-cookie: color=red; path=/scripts
Content-type: text/html
-
A cookie for a particular file
Set-cookie: color=red; path=/scripts/foobar.pl
Content-type: text/html
-
I have included a function in parse-lib.pl that will generate the current
time in GMT format. The function has an optional parameter that will allow
you to create a date in the future, by passing the number of seconds in the
future.
#current time in the format that Set-cookie wants
$now = &time_gmt;
#30 seconds in the future in the format that Set-cookie wants
$future = &time_gmt(30);