
09-Feb-2004, 08:51
|
 |
Senior Member
|
|
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
|
|
|
[LIBRARY]HTML Class & CGI handling
GID Forums C/C++ Forums
Code Submittal Form
Name/Brief Description:HTML/CGI Handling
Date of Original Submission:February 9, 2004
Submitted by:dsmith
License:GPL - http://www.opensource.org/licenses/gpl-license.php
Detailed Description:This is a library that I developed last fall to help me implement a web page that employed CGI usage. There is basically two parts to this library. The first part is the CGI input handling portion. This will parse the input of CGI call and place it nicely into a linked list for use in your cgi program. The other part is an html_class. This may seem kind of silly to people that are extremely familiar with HTML. Basically to use a c program in CGI, all you have to do is send your html code through a printf statement, which is pretty straight forward. However, I am much more comfortable writing in C then in HTML, so I tried to implement all of the HTML that I knew (very little) into a class. In addition, this allows me to use fast C calls/routines intermingled with my html processing. The zip file contains several files:- web_util.h - The header file for the library
- web_util.cpp - The implementation for the library
- list1.h - My linked list implementation (see here for more information.)
- web_poll.cpp - A sample file of how to use the library.
The included sample is really poor, but shows alot of the usage of the different elements. I have other samples, but they use a low-level database that I developed which I have not released yet (but I will...)
Problems/Limitations:- I have only compiled/ran this on linux with gcc (portability should be easy though)
- My understanding/use of the HTML language is awful. I would really like someone to look at this and help me implement this better.
- The HTML/web pages are pretty vanilla plain, because I have implemented so little.
- Uses C++ class, so it is not portable to strictly c compilers
- Code commenting could be better
Once again, I am really looking for feedback on this. I think this could be a very useful library, but it needs some help from someone more familiar with html than I. Not that it doesn't work. Everything I have done here works, but it is pretty basic right now.
|