topical media & game development

talk show tell print

lib-ch-example-ref-cgi-HTMLEncode.cgi / cgi



  #!/bin/ch
  /* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
  include <cgi.h>
  #pragma import <lib-ch-example-ref-cgi-HTMLEncode.cpp>
  
  int main() {
    class CResponse Response;
    class CRequest Request;
    class CServer Server;
    chchar *value;
   
    Response.setContentType("text/plain");
    Response.begin();
  
    printf("The Result of Server.HTMLEncode: \n");
    value = Request.getForm("HTMLToEncode");
    if (value != NULL)
        printf("\%s", Server.HTMLEncode(value));
    else
        printf("Please input characters for HTML encode first \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.