topical media & game development
lib-ch-example-ref-wcgi-addCookie.cgi / cgi
#!/bin/ch
/* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
include <stdio.h>
include <wcgi.h>
int main()
{
class CCookie ck;
class CResponse Response;
//put Cookie with name of testCookie, key of CookieKey and value of Cookievalue
ck.setName(L"testCookie");
ck.setPath(L"/");
ck.setValue(L"CookieValue");
//ck.setPath(L"/cgi-bin/ch/lang/demos/ref");
//ck.setVersion(0);
Response.addCookie(&ck);
ck.setName(L"cookie name");
ck.setPath(L"/");
ck.setValue(L"cookie value");
Response.addCookie(&ck);
Response.begin();
printf("Cookie: name=testCookie, value=CookieValue has been added<br>\n");
printf("Cookie: name=cookie name, value=cookie value has been added<br>\n");
Response.end();
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.