[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-cgicc] how to retrieve cookies

From: Ben Kuang
Subject: [help-cgicc] how to retrieve cookies
Date: Wed, 20 Apr 2005 03:45:11 -0400


I am using the following code to retrieve cookies, however, nothing
gets printed into the browser.
The cgi program is here:
I made sure that apache can recognize this as a cgi and it's in the
right directory.
And I made sure that there are cookies in my firefox browser.  

The code is as below:

#include "cgicc/Cgicc.h"
#include "cgicc/HTTPHTMLHeader.h"
#include "cgicc/CgiInput.h"
#include "cgicc/HTMLClasses.h"
#include "cgicc/HTTPCookie.h"

using namespace cgicc;
using namespace std;

int main(){
                vector<HTTPCookie> cookie;
                cookie = HTTPHTMLHeader().getCookies();

                cout << HTTPHTMLHeader() << endl;
                cout << html() << body() << endl;
                for(int i=0; i= cookie.size(); i++){
                        cout << cookie[i].getName() << endl;

                cout << body() << html() << endl;

        }//end try
        catch (exception& e){

Did I do anything wrong?  Can someone pls help me?  Thanks in advance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]