Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Using cookies

From: SunandaDH:aol at: 19-Aug-2004 5:08

Peter:
> So I figure I also need help on how to use cookies with REBOL. > How do I handle setting and getting cookies?
A search for "cookies" in the Script Library will turn up several worked examples: http://www.rebol.org/cgi-bin/cgiwrap/rebol/search.r?find=cookies Assuming you want simplest type of session cookie print join "set-cookie: " form now/precise print "Content-type: text/html^/" print ....your HTML page... will create a cookie with a (very probably) unique data value. And then later: select system/options/cgi/other-headers "HTTP_COOKIE" will access the cookie, if a browser has sent you one. (It gets a little more complicated if you want to set expiry dates, or you want more than 1 cookie per user). Sunanda.