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

Using cookies

 [1/4] from: maillist:peter:home:se at: 17-Aug-2004 7:55


Hello! I am trying to access a homepage which seems is only accessible after visiting the main page. Is there a simple solution to this? I think this have to do with the page using cookies? So I figure I also need help on how to use cookies with REBOL. How do I handle setting and getting cookies? Best regards, Peter Carlsson

 [2/4] from: maillist::peter::home::se at: 17-Aug-2004 7:55


Hello! I am trying to access a homepage which seems is only accessible after visiting the main page. Is there a simple solution to this? I think this have to do with the page using cookies? So I figure I also need help on how to use cookies with REBOL. How do I handle setting and getting cookies? Best regards, Peter Carlsson

 [3/4] from: alanore:comcast at: 18-Aug-2004 21:58


At 10:55 PM 8/16/2004, you wrote: My best-just a user-is to get Graham's readmail-list program and then you can do a search for cookies.I just did and got about 40 entries

 [4/4] 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.