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

[REBOL] Re: Cookie 4 newbie

From: syke::amigaextreme::com at: 13-Jul-2001 19:54

Hi, to set a cookie for a user, print it in the HTTP header, like this for example: print rejoin [{Content-Type: text/html^/Set-Cookie: foo=bar; expires=Fr, 01-Jan-2010 00:00:00 GMT; path=/^/}] The Path and Expires values are optional... to read the cookie, do something like this: cgi-headers: make block! system/options/cgi/other-headers do decode-cgi pick cgi-headers index? next find cgi-headers "HTTP_COOKIE" It's all in the head(ers) ;-) /Regards Stefan Falk - www.amigaextreme.com