On 18 Jun 2001, at 13:39, Gilles Detillieux wrote:

> According to Dan Langille:
> > > The work in progress is available at: 
> > > http://diary.unixathome.org/htdig/results.php 
> > 
> > I've made some progress.  See the code at 
> > http://diary.unixathome.org/htdig/results.php.txt
> > 
> > The next step is to take the incoming parameters from 
> > $QUERY_STRING, split them, and feed them into the call to htdig.sh 
> > (see #2 listed below).
> > 
> > > If you search on 'langille', you'll get two pages of results.  If you
> > > examine the URLS provided for the (2) link, you'll find: 
> > > 
> > > http://diary.unixathome.org/htdig/?config=htdig;format=htdig;words=lang
> > > il
> > >  le;page=2 
> > > 
> > > As I see it, there are two problems to solve: 
> > > 
> > > 1 - get the correct URL in there.  It should be 
> > > http://diary.unixathome.org/htdig/results.php 
> > 
> > This has been done.
> 
> I assume you discovered the "script_name" attribute.  It was added
> specifically for supporting PHP wrappers around htsearch.

Hmmm, looking at http://www.htdig.org/attrs.html, it refers me to 
contrib/scriptname, but I don't see that attribute being used there.

[dan@xeon:~/htdig-install/htdig-3.1.5/contrib/scriptname] $ grep 
"script_name" *
README:This is a small example to demonstrate the script_name 
attribute.
README:script_name:     /search/results.shtml
results.shtml:  -- script_name example using SSI
search.html:  -- script_name example using SSI

> 
> > > 2 - parse the arguments 
> > > "?config=htdig;format=htdig;words=langille;page=2" into something php
> > > can use. 
> > 
> > Anyone want to try this?  I'm off to bed.
> 
> Hope you had a good sleep.  I'm not sure, but I though someone on the list
> once mentioned that the latest version of PHP does support parsing query
> strings that use a semicolon as separator.  (Maybe I'm confusing this with
> the latest version of the Perl CGI library.)  HTML 4.0 does not allow bare
> ampersands in query strings within URIs in an HTML document, and they
> recommend the use of the semicolon instead.  So, any CGI program or code
> that parses query strings should now allow both, and use the semicolon when
> constructing a URI.
> 
> See http://www.htdig.org/FAQ.html#q5.21
> and http://www.htdig.org/FAQ.html#q4.13

I've been able to achieve a working wrapper without any &.  I just don't 
try to use them at all.  I spent a few hours creating very nice little 
scripts.  I enjoyed it but finally discovered a more simple approach.

Folks: please use and thrash this search page for me:

http://diary.unixathome.org/htdig/results.php

I think I've completed the basics. I just need to tidy it up. I'd like to know 
that it's functional before I start that process.  The code is available at 
http://diary.unixathome.org/htdig/results.php.txt and feedback is 
solicited.

cheers

-- 
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php

_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to