Skip to main content.
home | support | download

Back to List Archive

Re: SWISH-E Keyword Report

From: Gerald Klaas <gklaas(at)>
Date: Wed May 15 2002 - 17:14:56 GMT
I also watch submitted query strings to decide if I need to add words,
aliases or common misspellings to my documents.
I added the following subroutine to my CGI to capture info to a log file.

sub log_it {
# The log file must be writable by the web process (nobody)
open(LOG,">>$searchlog") || print "could not open log file please notify
# Only log if this is the production version of the script
if ( "$scrpt[$#scrpt]" eq "" ) {
print LOG "$acctime ^ $tcount ^ $query ^ $next ^ $kb\n"; }
else {
# if this is not the production script, print the troubleshooting info
# like the command line, the URL generated for the "Next" link, and all vars
# to the HTML page and nothing to the log file
print "<HR>This is the development


---end snip--

Then I added a call to the log routine from in within footer().
Note that the var $searchlog must be defined in the variables
initialization at the top of the script.


Thomas Kirwin wrote:

> Question: I am attempting to obtain code or instructions to make SWISH-E
> record top key words used by visitors when searching our site at
>  Such a utility or add-on would greatly help me maximize our
> site search engine results by allowing the inclusion of popular key words
> within the page or tag.
> Thanks in advance for your comments.
> Regards,
> Tom Kirwin
> e-Commerce Administrator
> Philadelphia Federal Credit Union
> 12800 Townsend Road
> Philadelphia, PA 19154
> W - (215) 934-4031
> F - (215) 934-4039
Received on Wed May 15 17:14:59 2002