Alle 05:53, venerd� 13 febbraio 2004, TI-Source Webmaster ha scritto: > Hello all, > > I am new to htdig and was wondering if it is possible to set it up such > that it (htsearch) returns a raw listing of files it found matches in (one > line for every match, full path to the file). > > Our site won't integrate with htdig unless I can call it from my own > search script (php) and parse the results myself (I don't want htdig > displaying the results, I just want it to tell my script the results). >
The htsearch program, as stated in the docs, produce HTML output. This output is a page divided into three section: header, body, footer. The content of each section is defined in 3 html files located in the common_dir: header.html, footer.html and long.html/short.html. The latter is based on 2 predefined templates builtin-long and builtin-short. As an alternative you can use just one file called wrapper.html which is a 'merged' version of the 3 files mentioned above. To make a quick test you should: 1) modify htdig.conf and uncomment the directive template_map and template_name; 2) modify the content of short.html which should contains only the string $&(URL) so that you will have a result page with just the URL which contain the matched word; 3) Call the htsearch program from within your php script with the name of the config file, the matchesperpage (set this variable to a very large number so that the result wil be in just one page) and the template to be used. For instance: http://your.domain/cgi-bin/htsearch?config=configname&words=word&format=short&matchesperpage=1000 4) parse the output. This is just a simple and quick test to see if it can suits your needs. Hope this helps. Maurizio ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click _______________________________________________ ht://Dig general mailing list: <[EMAIL PROTECTED]> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-general

