First off, I want to say thanks to the htdig developers. Your work has
added tremendous value to our site and if there was a way I could get out
university to give you big gobs of cash, I would. :-)

 For our search engine, I wanted things like restrict and config file
values to be dynamically generated by an SQL query via PHP.  I had a look
at the PHP wrapper for htdig, and found it a bit involved to setup.

 So, what I did instead was modify the Display.cc file in htsearch so that
it generated properly formatted query strings. All this meant was changing
';' for '&' in the Display::createURL method (16 of them to change).

 Then to insert the htdig query in a PHP page, I set script_name in the
config file accordingly and then did this:

<?

 <code to grab restrict, config and other stuff from PostgreSQL>

 $words=urlencode($words);
 
include("http://server_name.com/cgi-bin/htsearch_php?restrict=${restrict};config=${config};method=${method};sort=${sort};matchesperpage=${matchesperpage};words=${words};page=${page}";);

?>

 Anyway, I found this to be *much* easier than using the php wrapper
example, so hopefully this will be of use to someone else.

 Maybe it would be nice to have a config option in 3.2 where it could
compile a php friendly version? Just a thought.

 Thanks again.

Cheers,

Chris


-- 

Christopher Murtagh
Webmaster / Sysadmin
Web Communications Group
McGill University
Montreal, Quebec
Canada

Tel.: (514) 398-3122
Fax:  (514) 398-2017




_______________________________________________
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