Re: [htdig] Wrapper script for htsearch


Joseph Cheek (joseph@cheek.com)
Mon, 25 Oct 1999 11:14:07 -0700


this is the script name i was told to use:

#!/bin/sh
export SCRIPT_NAME=/results.php
exec "$0".real ${@+"$@"}

name this script htsearch, change htsearch to htsearch.real, and declare
SCRIPT_NAME to be the php results script. call it from within php as follows:

readfile ("http://your.server.here/cgi-bin/htsearch?$QUERY_STRING");

where QUERY_STRING is the same that would have been passed to htsearch.

hth

joe

Philip Coates wrote:

> I'm having some problems with wrappers for htsearch too. I want to build a
> PHP wrapper object that reads in the keywords selected by the user to
> assemble a single keywords string (keywords=x+y+z) and then pass that to
> htsearch and read the results by creating a new script which parses those
> results and puts them into the format we require.
>
> To test this sort of functionality I used a wrapper script similar to that
> published to this list:
>
> #!/bin/sh
> QUERY_STRING="config=phil3&keywords=northamerica&format=long&words=sample"
> REQUEST_METHOD=POST
> export QUERY_STRING REQEST_METHOD
> /home/www/cgibin/htsearch -vv
>
> All I get from this is a prompt for "words" and "format" as usual when run
> from the command line. Trying a similar approach to the above, but with the
> QUERY_STRING removed "cat $1 | /path/htsearch etc." still doesn't produce
> anything useful.
>
> What I'd like to do ultimately is call a method in my PHP wrapper class
> (something like wrapper->htsearch($type,$searchwords)) to make a call to
> htsearch with some given parameters... Is this possible or am I mad for even
> contemplating it?
>
> Thanks in advance,
>
> Phil Coates
>
> NoHo Digital
> Floor 2, Canberra House
> 315-317 Regent St
> London W1R 7YB
>
> phone: 44(0)207 299 3425
> mobile: 44(0)7711 818 384
> email: philc@noho.co.uk
> http: www.noho.co.uk
>
> ------------------------------------
> 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.

--
thanks!

joe

___ ___ __ | |_ __ __ | |_ __ __ _____ * Joseph Cheek, President / _)| \ / _) / _)| _) / _) / \ | | * joseph@cheek.com or ( (_ | | |( _)( _)| \ _ ( (_ ( () )| |_| | * (206) 282-2892 \__)|_|_| \__) \__)|_\_)(_) \__) \__/ |_| |_| * http://www.cheek.com/ Cheek Consulting, Inc., provides Linux and Internet solutions Caldera OpenLinux networking class - Nov 15th-18th - downtown Seattle

------------------------------------ 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 Mon Oct 25 1999 - 11:23:20 PDT