cgi-postin

cgi-postin utility processes data generated from a World-Wide Web form.
Download

cgi-postin Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Chip Rosenthal
  • Publisher web site:
  • http://www.unicom.com/sw/better_spam_protect/

cgi-postin Tags


cgi-postin Description

cgi-postin utility processes data generated from a World-Wide Web form. cgi-postin utility processes data generated from a World-Wide Web form. cgi-postin is a standalone processor that may be run easily from sh, perl, or Tcl scripts.Important Note: I recommend this tool only when implementing CGIs as shell scripts. For other languages, there are more modern and suitable tools for the task of CGI processing. For CGI processing in perl, I recommend the bundled CGI.pm module. For C, there are a number of packages available to do the task.SYNTAX cgi-postin The cgi-postin utility processes data generated from a World-Wide Web form. It is a standalone processor that may be run easily from sh, perl, or tcl scripts.By default, cgi-postin retrieves the form data and emits a short sh(1) script. If this script is evaluated, the shell will create a set of variables, one per form element. The variables will be named after the form element names, and they will be initialized to the associated form element values.If, for instance, a simple form has two fields called ``name'' and ``address'', cgi-postin will emit the sh(1) commands to create variables called ``name'' and ``address'', and each variable will be initialized to the value given in the form. This can be done by simply saying: eval "`cgi-postin`" || exit 1If an error occurs, cgi-postin emits a complete HTTP document (including a ``Content-type:'' header), and terminates with a non-zero exit status.The following options are supporeted. -p The variable assignments will use perl(1) syntax. Recommended usage is something similar to: eval `cgi-postin -p`; exit 1 if $? != 0; -T The variable assignments will use tcl(1) syntax. Recommended usage is something similar to: eval -t Selects ``terse diagnostics'' mode. When an error occurs, a typical Unix error message is emitted rather than an HTTP document. -v name This option almost always should be specified. It is an option only for historical reasons. It is explained below.When -p (perl mode) or -T (Tcl mode) are specified, then the -t option creates an associative array rather than individual (scaler) variables for each form element. The array has the specified name, and the data are stored one form element per array element.The following table illustrates how this naming scheme works. It shows the variable name that would be associated with a form element called ``query'' for all the various command line invocations. center ; lf2 lf2 l l . command variable name cgi-postin $query cgi-postin -v CGI $CGI_query cgi-postin -p $query cgi-postin -p -v CGI $CGI{'query'} cgi-postin -T $query cgi-postin -T -v CGI $CGI(query)


cgi-postin Related Software