Search Tools for Your Web Site posted: 10/10/05

The beauty of this search tool is that you can add files to be searched to a local text file either manually, one at a time, or with script, automatically. Plus you can add several search tools, one for each section of your web site you want searched, each one totally isolated from the others. However it only searches the <TITLE> tags (use the highlighted search tool below for whole page searches).

There are two tools you can download: one that will rewrite the requested page highlighting the search term and one that will return a link to the file. The highlighted version rewrites the web page locally and requires all links be absolute in the searched pages. The other simply writes a link to the page found in the search.

As you can see either tool needs some foresight to work on your site. I am available to customize these tools if needed.




Web Site Search Tool posted: 10/10/05

Web site search tool. Just add files you want searched to text file. No index file created.

Download now: Site Search Tool

To install:
1. add or make 'siteSearch' directory in your cgi-bin directory.
2. unzip 'siteSearchTool.zip' and upload 'search.pl' (chmod 700) and 'searchList.txt' (chmod 644) files to 'siteSearch' directory.
3. Install link or form elements where you want the search tool on your site. Example below.


Example form element for site search tool
<form ENCTYPE =" multipart/form-data" name =" SEARCH_FORM" action =" http://www.YOUR-DOMAIN-NAME-HERE.com/cgi-bin/siteSearch/search.pl" method =" post">
<font style =" font-size:9pt; color:#000000; font-weight:500; font-family:Verdana, Arial, Serif;">Search This Site:</font>
<input type =" text" name =" SEARCH_TERM" style =" font-size:8pt; color:#000000; font-weight:bold; font-family:Arial, Serif; border-color:#000000; border-top-width:1; border-left-width:1; border-right-width:1; border-bottom-width:1pt; background:#dfdfdf;" size =" 20">
<!-- input type = "submit" -->
<!-- Note submit button is commented out -->


Looks like:    
Search This Site:


Highlighted Search Tool for Your Web Site posted: 06/07/07


Highlighted site search tool. Just add files you want searched to text file. No index file created.

Download now: Highlighted Site Search Tool

To install:
1. add or make 'siteSearch' directory in your cgi-bin directory.
2. unzip 'highlightedSiteSearchTool.zip' and upload 'search.pl' (chmod 700) and 'searchList.txt' (chmod 644) files to 'siteSearch' directory.
3. Install link or form elements where you want the search tool on your site. Example below.

Note: Links must be absolute in web pages listed for searching in your searchList.txt file if you would like to maintain aesthetics. For example and an absolute link to an image is: src = http://www.programsplus.us/images/viewCart.gif. Also note that these search tools are crude (as time allows) and your web pages should be properly constructed for accurate searches. The highlighted version simply strips the tags and marks pages in text sections only. An errant '<' or '>' could corrupt the rewritten page or produce an incomplete search. Also note text outside the body tags may return a match but not show a visible highlighted search term on the page, such as javascript code. To circumvent this, code should be called from a src file.


Example form element for site search tool
<form ENCTYPE =" multipart/form-data" name =" SEARCH_FORM" action =" http://www.YOUR-DOMAIN-NAME-HERE.com/cgi-bin/siteSearch/search_highlighted.pl" method =" post">
<font style =" font-size:9pt; color:#000000; font-weight:500; font-family:Verdana, Arial, Serif;">Search This Site:</font>
<input type =" text" name =" SEARCH_TERM" style =" font-size:8pt; color:#000000; font-weight:bold; font-family:Arial, Serif; border-color:#000000; border-top-width:1; border-left-width:1; border-right-width:1; border-bottom-width:1pt; background:#dfdfdf;" size =" 20">
<!-- input type = "submit" -->
<!-- Note submit button is commented out -->


Looks like:     Search This Site:


Additional Notes last updated: 06/07/07
Number of Files

It's important to note these files aren't indexed for a search tool. That's where an index file is created consisting of key words that your customer might search and the indexed words are linked to the appropriate file. As it is, the downloadable search tools provided here search all the text in the files listed in the searchList.txt file. This limits the number of files that can be searched. Depending on the speed of the server's microprocessor and the size of the files searched, one hundred to two hundred files may be the maximum number of files that can be searched conveniently. We have successfully operated this search tool with 100 files from the ProgramsPlus web site. Currently this version is searching through approximately 4MB of text data on the programsplus.us web site.

Multiple Search Tools

There's only one place in the script you'll need to change if you add multiple highlighted search tools. It's well marked and it's the call to the 'rewrite_highlighted.pl' code in the 'search_highlighted.pl' script.

I'd also recommend adding sub directories under the cgi-bin/siteSearch directory for each additional search tool added. For example you might have a search tool for docs at cgi-bin/siteSearch/docs/search.pl and another for lists at cgi-bin/siteSearch/lists/search.pl. You'll also want to add the appropriate searchList.txt files in each directory and add the form link/call to those files.

Advanced Search Opportunities

We do indexing. If you'd like a customized search engine written for you site we can provide the proper tools to index files and create a comprehensive web site search tool. We love to code. It's our therapy.


 

 

email