Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 1999 10:35:18 -0800
From:      John-Mark Gurney <gurney_j@efn.org>
To:        keith@apcs.com.au
Cc:        questions@freebsd.org
Subject:   Re: cgiparse ? how to
Message-ID:  <19990217103518.43814@hydrogen.nike.efn.org>
In-Reply-To: <XFMail.990218004704.keith@apcs.com.au>; from Keith Anderson on Thu, Feb 18, 1999 at 12:47:04AM %2B1100
References:  <XFMail.990218004704.keith@apcs.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Keith Anderson scribbled this message on Feb 18:
> anyone used "cgiparse" in the ports collection.
> 
> any demo programs I can look at to see how it ticks?

there is a test.c file that I included with the distribution that
I use to test a few of the functions as I write them... but the library
is very easy to use....

> any www pages or pointers, some kind person may shed some light on me.

basicly you can just do something like:

int
main(int argc, char *argv[])
{
	htmlheader();
	printf("<html><head><title>%s</title></head><body>%s</body></html>",
		cgigetvalue("title"), cgigetvalue("body"));

	exit(0);
}

there you go, you now have a cgi that puts the value of title into the
title, and the value of the body into the body of the page returned...

most of the documentation is in the cgi.h header... but there are a few
man pages included that give you the basic usability for it...

I am also going to be releasing a new version of cgiparse really soon
now that will be more cross platform compatible (doesn't use bsd make
files) and I believe fixes a couple bugs...

if you have any more questions, you can directly address me...

-- 
  John-Mark Gurney                              Voice: +1 541 684 8449
  Cu Networking					  P.O. Box 5693, 97405

  Live in Peace, destroy Micro$oft, support free software, run FreeBSD
	    Don't trust anyone you don't have the source for


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990217103518.43814>