KSearch - An Excellent Free Website Indexer and Search
Engine Script

Introduction
Several companies offer free offsite search for your website. The best of these and the one I used for a couple years was Atomz (www.atomz.com). The disadvantage of using one of these services is that they add either advertisements or links off your site. Most do not offer custom templates so that your search results page does not match your site navigation (with Atomz being the exception). Atomz has the disadvantage of only offering its free services to sites with fewer than 500 pages. When this site went over 500 pages, I began to search for a free search script that didn't require ads. After testing many different free website search engines, I have determined that KSearch is the best free script. However, its relevance was not as good as Atomz or FM SiteSearch Pro (an inexpensive site search script).
Installation
This is a simplified, "quick and dirty" instruction set to get the program up and running.
- Download the program at http://www.kscripts.com/.
- Extract the downloaded program using Win Zip or other zip extraction program.
- Open the "ksearch" folder. Open the "ksearch.cgi" file with a text editor (like Notepad, BBedit, etc.). Edit the first line (Path to Perl) if necessary. For most hosts, no editing will be necessary (default is "#!/usr/bin/perl").
- Open the "configuration" folder within the "ksearch" folder.
Open the "configuration.pl" file with a text editor. You must edit
four settings within this file. If your hosting service uses CPANEL,
these are the settings you should use:
- $INDEXER_START = '/home/yourusername/public_html/';
- $BASE_URL ='http://www.yourwebsite.com/';
- $SEARCH_URL = "http://yourwebsite.com/cgi-bin/ksearch/ksearch.cgi";
- $KSEARCH_DIR = '/home/yourusername/public_html/cgi-bin/ksearch/'; # re-index
- Other settings in the "configuration.pl" file may be edited, depending upon how you want the searches to be done. For most users, the default settings are fine.
- If there are directories that you do not want searched, you must edit the "ignore_files.txt" file within the "configuration" folder (e.g., /home/yourusername/public_html/cgi-bin).
- Upload the entire "ksearch" folder using an FTP client into the cgi-bin directory where your html files go. Change the permissions of the "ksearch.cgi", "indexer.pl", and "indexer.cgi" files within the "ksearch" folder to 755.
- There are two ways to index your site. One way is to
run the "indexer.cgi" file from within your browser (in
order to do this, you must enter a password where indicated in the "configuration.pl"
file). This script may or may not work, depending upon how large your
site is and how long a script is allowed to run on your host before
timing out. The documentation indicates that
the script will probably timeout on large websites and, thus, fail to
index your site. I recommend using indexer.pl from Telnet. Here are
the instructions for doing this if your host uses CPANEL:
- Log into your control panel. Click the link that is labeled "SSH Session" (it may be labeled "SSH/Telnet shell access" under the "Access Menu", depending upon which version of CPANEL is running). The browser will start another process that will appear in a separate window. Alternatively you can use a standalone program, such as PuTTY.
- When the prompt comes up, hit "Enter". Another prompt will prompt for your username (the same one you use for CPANEL). Type in your username and press "Enter". If you are prompted with an error message, click "yes" to continue.
- Enter your password and "Enter".
- Type "/home/yourusername/public_html/cgi-bin/ksearch/indexer.pl" and enter. The display will show the files as they are being processed. When the program has completed, it will indicate how many files were processed and the processing time. For this site, it took ~5 minutes for 1,477 files (16,173 KB) with 1,500,894 total search terms.
- Exit your Telnet session.
- You can do a simple search using the following code:
<form action="http://yourwebsite.com/cgi-bin/ksearch/ksearch.cgi" method="get" name="search">
<input type="text" name="terms"><input type="submit" value="Search">
</form> - A more advanced search form is available with the documentation ("search_form.html") or see below.
Templates
Templates are not necessary, but provide a way to match the look and navigation of your site. Create the template using your favorite HTML editor or use one that you have already created. The default Ksearch template ("search.html") is located within the "templates" folder within the "ksearch" folder. Make sure that you use absolute links (e.g., "/images/your.jpg") so that all your images, scripts, and stylesheets are referenced correctly. Copy the code from the "search.html" page into your template and upload the revised "search.html" file into your cgi-bin/ksearch/templates folder.
Conclusion 
There are many more options and much more documentation on the KSearch website. However, these brief instructions will get you going without having to wade through their documentation. Check KSearch in action on this site:
Daily Deals from Buy.com
We are a leading retailer focused on providing a positive shopping experience & competitive prices and free shipping for over 9 million products.
- 05/18/2012 03:00 AM
Get a Backyard Edition Corntoss Bean Bag Game for $49.99 at Buy.com, a $10 Savings! Valid through 05/22/2012
PRODUCT: Buy.com Price: $49.99, List Price: $59.99 SAVE $10, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a NewAir AF-520 16" Oscillating Outdoor Misting Fan for $104.99 at Buy.com, a $62.96 Savings! Valid through 05/22/2012
PRODUCT: Buy.com Price: $104.99, List Price: $167.95 SAVE $62.96, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a Deluxe Natural 10' Offset Outdoor/Patio Umbrella for $89.95 at Buy.com! Valid through 05/22/2012
PRODUCT: Buy.com Price: $89.95, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a 29" Round Steel Fire Pit (Black Finish) for $29.99 at Buy.com, a $40 Savings! Valid through 05/22/2012
PRODUCT: Buy.com Price: $29.99, List Price: $69.99 SAVE $40, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a Kelty Canopy House - 10' x 10' Portable Shelter for Backyard/Camping for $79.99 at Buy.com, a $66 Savings! Valid through 05/22/2012
PRODUCT: Buy.com Price: $79.99, List Price: $145.99 SAVE $66, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a Black & Decker MM1800 18" Rear Bag Mulching Mower for $159.99 at Buy.com! Valid through 05/22/2012
PRODUCT: Buy.com Price: $159.99, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a 52" Cat Tree Condo Scratchpost Pet House (Beige) for $49.99 at Buy.com, a $53 Savings! Valid through 05/22/2012
PRODUCT: Buy.com Price: $49.99, List Price: $102.99 SAVE $53, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a 10" Thick King Size Comfort Select 5.5 Memory Foam Mattress Bed for $299.99 at Buy.com, a $1475 Savings! Valid through 05/22/2012
PRODUCT: Buy.com Price: $299.99, List Price: $1774.99 SAVE $1475, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a Quarter Master 7850 Electronic/Digital Home Office Security Safe for $44.99 at Buy.com, a $84.96 Savings! Valid through 05/22/2012
PRODUCT: Buy.com Price: $44.99, List Price: $129.95 SAVE $84.96, Valid through 05/22/2012
image/jpg (1 Bytes) - 05/18/2012 03:00 AM
Get a 3" Full/Double Size Accu-Aire 3.3 Visco Elastic Memory Foam Mattress Topper for $49.99 at Buy.com, a $266 Savings! Valid through 05/22/2012
PRODUCT: Buy.com Price: $49.99, List Price: $315.99 SAVE $266, Valid through 05/22/2012
image/jpg (1 Bytes)
http://www.godandscience.org/general/ksearch.html
Last Modified December 10, 2007



