The qDecoder Project

[svn] / releases / qDecoder-6.0.0 / examples / fetch.c

Parent Directory Parent Directory Revision Log Revision Log


Revision 477 - Download Blame
Mon Jan 4 22:16:59 2010 UTC (8 months ago) by wolkykim
File size: 2047 byte(s)
Renaming RB-6.0 to qDecoder-6.0
    1 /************************************************************************
    2 qDecoder - C/C++ CGI Library                      http://www.qDecoder.org
    3 
    4 Copyright (C) 1999,2000 Hongik Internet, Inc.
    5 Copyright (C) 1998 Nobreak Technologies, Inc.
    6 Copyright (C) 1996,1997 Seung-young Kim.
    7 
    8 This library is free software; you can redistribute it and/or
    9 modify it under the terms of the GNU Lesser General Public
   10 License as published by the Free Software Foundation; either
   11 version 2.1 of the License, or (at your option) any later version.
   12 
   13 This library is distributed in the hope that it will be useful,
   14 but WITHOUT ANY WARRANTY; without even the implied warranty of
   15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   16 Lesser General Public License for more details.
   17 
   18 You should have received a copy of the GNU Lesser General Public
   19 License along with this library; if not, write to the Free Software
   20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   21 
   22 Copyright Disclaimer:
   23   Hongik Internet, Inc., hereby disclaims all copyright interest.
   24   President, Christopher Roh, 6 April 2000
   25 
   26   Nobreak Technologies, Inc., hereby disclaims all copyright interest.
   27   President, Yoon Cho, 6 April 2000
   28 
   29   Seung-young Kim, hereby disclaims all copyright interest.
   30   Author, Seung-young Kim, 6 April 2000
   31 
   32 Author:
   33   Seung-young Kim <nobreak@hongik.com>
   34   5th Fl., Daewoong Bldg., 689-4, Yoksam, Kangnam, Seoul, Korea 135-080
   35   Tel: +82-2-562-8988, Fax: +82-2-562-8987
   36 ************************************************************************/
   37 
   38 #include "qDecoder.h"
   39 
   40 int main(void) {
   41   char *value;
   42 
   43   qContentType("text/html");
   44   qDecoder();
   45 
   46   /* If the query is not found, the variable value will be set default.
   47      Also, you can use qValueDefault() or qValueNotEmpty() instead. */
   48   if(!(value = qValue("query"))) value = "";
   49 
   50   printf("You typed: <b>%s</b> \n", value);
   51 
   52   /* It's not necessary that you free the variable value directly
   53      such like free(value). qFree() will do that for you. */
   54   qFree();
   55   return 0;
   56 }

Home | About | Examples | Changes | Download | SVN Repository | Install | Reference