[REBOL] Re: Reading and setting cookies
From: SunandaDH:aol at: 20-Nov-2005 5:12
Giuseppe :
> I need to read and set cookies when accessing pages. How can I do this ?
Setting a cookie is as simple as printing the right HTTP header:
print "set-cookie: ....."
Reading the cookie means looking in a CGI header
cookie-value: select system/options/cgi/other-headers "HTTP_COOKIE"
[It's slightly more complicated if you want to use multiple cookies of type 2
for any one visitor.]
Some sample code and (incomplete) notes on it here:
http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?color=yes&script=cook
ie-example.r
http://www.rebol.org/cgi-bin/cgiwrap/rebol/documentation.r?script=cookie-examp
le.r
Sunanda.