Re: [htdig] Integrating PHP in htsearch?


Subject: Re: [htdig] Integrating PHP in htsearch?
From: David Gewirtz (david@ZATZ.com)
Date: Wed Dec 27 2000 - 07:56:07 PST


Hey, it's definitely a start. So you're saying use PHP and stick htsearch
results inside, rather than to run htsearch results _through_ PHP? Hmmm..
what do you do about paginated results?

-- DG

At 04:42 PM 12/27/00 +0100, you wrote:
>
>
>David Gewirtz wrote:
>>
>> Is it possible to integrate PHP in a search results page? I want to use a
>> PHP include function to pull some text off another server and stick that in
>> my results header. My version of Apache is currently set up to require a
>> file of the form somefile.php3. If I access the server with
>> http://www.myserver.com/somefile.php3, the results are perfect.
>>
>> Now, here's the question: how do I get the search results from htsearch to
>> pass through PHP before being sent to the user? And, please, I'm hoping I
>> don't need to hack my Apache setup ('cause I get the willies each time
I do).
>>
>
>What I'm doing is something like
>
> // cut here
> $cmd =
>sprintf("/cgi-bin/htsearch?words=%s&method=%s&format=%s&sort=%s",
> $words, $method, $format, $sort);
> if($page != "") {
> $cmd = sprintf("%s&page=%s&START=1", $cmd, $page);
> }
>
> virtual($cmd); // get search results
> // cut here
>
>This enables me to use the layout our customer needs for his page and
>also
>gives me the ability to create a more detailed search form. It's
>something
>like a wrapper for htsearch. Doing it this way you needn't change your
>Apache setup.
>
>I haven't tried to filter htsearchs result page with php. It is not
>possible
>to do that using virtual() with php v3, but maybe you can find something
>usefull at http://www.php.net
>
>Hope that helps you in some way?!?
>
>--
>
>mit freundlichen Gruessen
>Mathias Rohland
>
>Gurus
>Zurawski, Zurawski, Poppl und Rohland GbR
>Borsigstr. 11-13
>65205 Wiesbaden-Nordenstadt
>
>WWW: http://www.gurus-net.de
>eMail: mro@gurus-net.de
>Tel: 0 61 22 / 93 92 22
>Fax: 0 61 22 / 93 92 11

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-unsubscribe@htdig.org
You will receive a message to confirm this.
List archives: <http://www.htdig.org/mail/menu.html>
FAQ: <http://www.htdig.org/FAQ.html>



This archive was generated by hypermail 2b28 : Wed Dec 27 2000 - 08:01:54 PST