Skip to main content.
home | support | download

Back to List Archive

Re: SWISH-E Keyword Report

From: Gerald Klaas <gklaas(at)not-real.arb.ca.gov>
Date: Wed May 15 2002 - 17:14:56 GMT
Thomas,
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.

---snip---
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
webmaster";
# Only log if this is the production version of the script
if ( "$scrpt[$#scrpt]" eq "search.pl" ) {
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
script<HR>$command_line<HR>$next_link<HR>$vars";
print "<HR>$ENV{HTTP_REFERER}";
     }

close(LOG);
}

---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.

Gerald


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
> www.pfcu.com.  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
> www.pfcu.com
Received on Wed May 15 17:14:59 2002