Thread: cookies & cgi & c/c++

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    23

    cookies & cgi & c/c++

    Hi!
    I wonder how to read and set cookies in cgi using c or c++?
    I looked it up in google but only what i've found was begginers cgi tutorial, no info about cookies. Please help.

    Sorry for my English.

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    I would look into the CGIC library. It might make your life easier.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    23
    But I don't want to use any libary. I'd like to write one on my self and understand how it works.
    Anyway thx for help (if it is an open source libary i try to look at it's source)

  4. #4
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    It is open source

  5. #5
    Registered User
    Join Date
    May 2004
    Posts
    23
    yeah, i've already checked ;>
    i know how to set a cookie:
    Set-Cookie: name=value; domain=.domain.com; expires=day, day-month-year hour:minute:second GMT; path=/\r\n

    but still don't know how to retrive a cookie.... Anybody know?

  6. #6
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751
    I think you can get a basic Idea by reading the info from here.
    After that if you know C well like file i/o and such you can create a simple libray or module to handle such that you can call into your code. If you read any other language as well. you might try looking at how it is done and implement it thus in C/C++. The only other one I know of in another language is this site.
    Good luck.
    Warning: Opinions subject to change without notice

    The C Library Reference Guide
    Understand the fundamentals
    Then have some more fun

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 11-16-2008, 10:29 PM
  2. CGI program help please
    By Lince in forum C Programming
    Replies: 3
    Last Post: 08-01-2007, 01:31 AM
  3. First party tracking cookies Meow!
    By kryptkat in forum Tech Board
    Replies: 13
    Last Post: 08-12-2006, 06:29 PM
  4. testing a cgi script on my computer
    By Bigbio2002 in forum C Programming
    Replies: 1
    Last Post: 12-14-2003, 07:26 PM
  5. Math Test Problem Disagreement
    By orbitz in forum A Brief History of Cprogramming.com
    Replies: 29
    Last Post: 02-28-2003, 04:27 PM