topical media & game development

talk show tell print

lib-ch-example-ref-wcgi-getCookie.cgi / cgi



  #!/bin/ch
  /* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
  include <wcgi.h>
   
  int main() 
  {
    class CResponse Response;
    class CRequest Request;
    chchar name[] = L"testCookie";
    chchar *value;
  
    Response.begin();
    Response.title(L"Test of Request.getCookie");
    printf("<H1> Test of Request.getCookie </H1>
\n"); //get Cookie value = Request.getCookie(name); fputws(name, stdout); printf(" = "); fputws(value ? value : L"(null)", stdout); printf(" <p> \n"); value = Request.getCookie(L"cookie name"); fputws(L"cookie name", stdout); printf(" = "); fputws(value ? value : L"(null)", stdout); printf(" <p> \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.