corner  
 products
 download
 subscription downloads
 purchase
 help
 reference links
 support
 search
 faq
 home
 projects
Scripts
 psManager
 
 psDelimited
 
 psMembers
 
 Report Tools
 
 Forum
 
 credit cards
 
 shopping cart
 
 UPS shipping cost
 
 UPS shipping address
 
 Amazon Associates
 
 html help
 
 html email
 
 psViewer
 
 psBanner
 
 psSiteSearch
 
 PGP email
 
 eCards
 
corner    

Perl Studio for Windows 95/98/2000/NT

Perl Studio psSiteSearch

Perl Studio psSiteSearch is a set of Perl scripts that:
Creates a searchable keyword index of the html pages on your web site.
Easy admin for adding, updating, deleting the information in your database.
Set the types of files to index.
Set the directories not to search.
   
MySQL version
   

These scripts are included with the Perl Studio member subscription.

Perl Studio psSiteSearch demo:

Perl Studio Site Search


Installing Perl Studio psSiteSearch scripts , DBI::SQL version

Unzip the site_search.zip archive file on your local hard drive.

Change the first line of the scripts to point to the correct path for perl version 5 or greater on your server.

The default perl path in the scripts is #!/usr/local/bin/perl
other possible paths to perl
#!/usr/bin/perl
#!/usr/local/bin/perl5

psSiteSearch script files
cgi-bin/search.cgi
cgi-bin/search_admin.cgi
cgi-bin/search_params.cgi
cgi-bin/search_import.cgi
cgi-bin/search_index.cgi
cgi-bin/search_lib.cgi

(note: The script files params.cgi and search_lib.cgi do not need a perl path tag.)

Upload all the script files into your cgi-bin directory.

Create a 'template' directory under your public_html directory.


Upload the search_print.html and search_template.html into the template directory. The search_print.html file is used to print database records by the admin script.
Modify the search_template.html file to reflect your web site design. Edit the form action tag to point to the search.cgi script file on your server.
The search template displays the search results by replacing the hidden html tag with the search results returned by the search.cgi script file.
Hidden html tag: <!--insert_search_results_here-->
Copy and paste the form search contents in the search.html file into one of your html files to allow vistors to your site to seach your site. Edit the form action tag to point to the search.cgi script file on your server.

Next, make sure the files and directories have the correct permissions. Script file permissions should be 755.

User Modifications


The following lines from the params.cgi file define the location of important files and database parameters. These lines must be modified before running the scripts:

Required Modifications that need to be set before you use the site search scripts


Access to your DBI::SQL Database will require that you supply your userid and password
$dbuser = 'your user id';
$dbpass = 'your password';

Access to your DBI::SQL Database will require that you supply the name of your database,
usually the same as your userid
$dbname = 'your database name';

The name of the database driver your using. It can be mysql or any DBI:DBD driver
$dbdriver = 'mysql';

The URL to the database server, usually localhost, if the database server is on the same machine.
$dbserver = 'localhost';

Edit the $root_dir variable that the search_index.cgi script file starts the keyword index search in.

		$root_dir = "$ENV{DOCUMENT_ROOT}";
		

Edit the $rootURL variable that the search_index.cgi script file uses to apprend to the list of files that are returned by the search_index.cgi script file.

		$rootURL = "http://$ENV{HTTP_HOST}";
		

Edit the @file_types array variable to reflect the types of files the search_index.cgi script file should search.

		@file_types = qw(htm html shtml );
		

Edit the @dont_search_dir array variable, to reflect the directories that are not searched by the search_index.cgi script file.

		@dont_search_dir = qw(cgi-bin demo admin members images templates database export tmp);
		

First run the search_create.cgi script to create your new site search database table.
You can now load the Perl Studio search_admin script and run the Make Index function to create your keyword index of your site.
Load http://yourserver/cgi-bin/search_admin.cgi (replace 'yourserver' with your own server name) in your browser and make sure it functions correctly.


products| purchase | download | subscription downloads
help | reference | support | search | faq | home

Perl Studio Home Page © Copyright 2001 AyerSoft Company