Personal search engine

Learn how to create a personal search engine using Perl.

provided by: 
Originally published at Internet.com


Oh man, do people want this! I get so many letters asking for a search engine that will search just the user's site. Well, here ya go. This will search whatever directory you want, list the results, and even recognize if any results were found or not. The script is fairly robust, checking not only the title and file, but also the full file text. I'm giving you a fairly bare-bones results page. You can gussy it up all you want. I'm interested in the script more than its appearance here.

How about we have a look-see, huh? This script is set up to search the directory that contains all of the PERL primers. If you want to be sure to get some results, search "perl" or "Joe". If you want to be sure to not get results, try searching "zorkbabble". I don't think that appears.

See "Search It!" in Action

The HTML and PERL Code



The HTML could not be easier. It's a simple on text box form with a submit button.

The HTML Code

Be sure to change out that ACTION statement so that your HTML attaches to your CGI.

I've done my best to explain as much of the script as possible in the script itself. I've commented out all of the explanation so you can go ahead and paste it as you see it. Be aware there a multiple points in the script where you have to put in your own paths. Don't just copy, paste, upload and hope it'll work. As has been the case in the last couple of primers, I'll open the script in a new window so you can look back and forth...

Read article at Internet.com site
Related Articles
- Checking out your Cookies' Crumbs
Do you know what is stored in your cookies? If not, it is simple to see the contents of a cookie! This article explains what you need to enter into your browser to see the cookie from any web page. It's probably easier than you think!
- Password Protection
- ADO is AOK (a simple ADO tutorial)
- JSP: Creating a Configurable Home Page
- Replace the Space With a (+)
- Do the Search
- ASP Example 2: Password Protection
- Creating a Weblog using JScript .NET and ASP.NET
- Integrating Twitter into the Zend Framework
Regional Articles
- Personal search engine Alabama
- Personal search engine Alaska
- Personal search engine Arizona
- Personal search engine Arkansas
- Personal search engine California
- Personal search engine Colorado
- Personal search engine Connecticut
- Personal search engine DC
- Personal search engine Delaware
- Personal search engine Florida
- Personal search engine Georgia
- Personal search engine Hawaii
- Personal search engine Idaho
- Personal search engine Illinois
- Personal search engine Indiana
- Personal search engine Iowa
- Personal search engine Kansas
- Personal search engine Kentucky
- Personal search engine Louisiana
- Personal search engine Maine
- Personal search engine Maryland
- Personal search engine Massachusetts
- Personal search engine Michigan
- Personal search engine Minnesota
- Personal search engine Mississippi
- Personal search engine Missouri
- Personal search engine Montana
- Personal search engine Nebraska
- Personal search engine Nevada
- Personal search engine New Hampshire
- Personal search engine New Jersey
- Personal search engine New Mexico
- Personal search engine New York
- Personal search engine North Carolina
- Personal search engine North Dakota
- Personal search engine Ohio
- Personal search engine Oklahoma
- Personal search engine Oregon
- Personal search engine Pennsylvania
- Personal search engine Rhode Island
- Personal search engine South Carolina
- Personal search engine South Dakota
- Personal search engine Tennessee
- Personal search engine Texas
- Personal search engine Utah
- Personal search engine Vermont
- Personal search engine Virginia
- Personal search engine Washington
- Personal search engine West Virginia
- Personal search engine Wisconsin
- Personal search engine Wyoming
Related Articles

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML