Skip to main content.
home | support | download

Back to List Archive

(no subject)

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Mon Mar 15 2004 - 17:39:16 GMT
On Mon, Mar 15, 2004 at 09:25:36AM -0800, Bill Pavich wrote:
> Yes, I know. You can simply use href html tags like so with the index
> predefined and search terms predefined on the command line:
> 
> <a
> href=/cgi-bin/swish-quick.cgi%20\"/opt/swish-index/swish031104.index\"%2
> 0\"weather page pubdate=031504\">Weather Page for March 15, 2004</a>
> 
> Then, in swish-quick.cgi:
> 
> My $indexargument = $ARGV[0];
> My $searchstringargument = $ARGV[1];

No.  With CGI you pass in a valid request, the server sets up the environment
with the CGI parameters and then runs the cgi program.  The cgi params are not
available via @ARGV they are either available from stdin with POST or in QUERY_STRING
with GET requests.

Say you want a predefiend search for the phrase "swish.cgi" you could
use this:


<a href="http://swish-e.org/Discussion/search/swish.cgi?query=%22swish.cgi%22">
    Search for &quot;swish.cgi&quot;
</a>

> Am I just way off on this, or does that sound like something that's
> doable?

You want to show search results, right?  The pass in a URL that
generates the search results.  It should be that simple.

-- 
Bill Moseley
moseley@hank.org
Received on Mon Mar 15 09:39:17 2004