Re: [htdig] Calling htsearch using CGI.pm


htdig@narwhal.cisti.nrc.ca
Tue, 6 Jul 1999 09:29:40 -0400 (EDT)


&method=post looks fishy, normally method = and, or, or boolean.

here's one example that works for me:

#!/usr/bin/perl
use CGI;

$c = new CGI ;
$words = "narwhal+whale";
print
$c->redirect("/cgi-bin/htsearch?config=dig_nrc_ca_e\&restrict=\&exclude=\&method=or\&format=builtin-long\&words=$words");

Good luck,

Alex
alex.chan@nrc.ca

On Sat, 3 Jul 1999, Jeff Beard wrote:

>
> Hi,
>
> I want to use a drop down menu to differentiate a keyword search of the
> website from a product database. But when I use an intermediate program,
> the website search is only done on the first keyword. Multiple keywords
> show up in the URL but don't seem to be passed to htsearch.
>
> Could someone explain how I can make sure that all keywords are passed and
> used, please?
>
> If you are familiar with Perl, I'm using CGI.pm and using a redirect with
> the pertinent information:
>
> $query->redirect("/bin/htsearch?words=$words&method=post&config=htdig&format
> =long");
>
> Also, I prefer not to use system() or exec() (using taint checking) and I'm
> not using standard CGI rather mod_perl.
>
> I've tried substituting a "+" for any spaces in the keywords but it does
> the same thing. Only a simple form calling htsearch directly gives the
> expected result.
>
> Thanks for your time.
>
> Cheers,
>
> Jeff
>
>
>
>
> Jeff Beard
>
> _____________________________
> McGuckin Hardware
> 303.443.1832 x2646
> www.mcguckin.com
> ------------------------------------
> To unsubscribe from the htdig mailing list, send a message to
> htdig@htdig.org containing the single word "unsubscribe" in
> the SUBJECT of the message.
>

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Tue Jul 06 1999 - 05:46:57 PDT