Solved

Searching html files

Posted on 1997-07-12
1
163 Views
Last Modified: 2013-12-25
I'm trying to write a search engine in 'C'for several www pages. The idea i that the search engine will search through these pages and record the number of times the required word is found. It should also return the URL of the pages where the word was found. I've written an html form asking for the search word, but I'm not having much luck opening the required html files and searchig through them. I dont really know the best way to search through html files.  Can anyone please help ?  I originally posted this question on the C pogrammers questions, but was advised to try here instead.
               Phil H.
0
Comment
Question by:ee96m17
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
icd earned 200 total points
ID: 1829037
I assume you are able to run cgi scripts on your server (always worth asking).

You can find several search engine scripts in C at the following URL.

http://www.cgi-resources.com/

Follow the links to 'scripts' 'C' and then Search Engines.

Don't discount scripts written in other languages (such as perl)

One further point I would make. You have two options. The first one is that the search takes place at the point the user submits the form. This is OK if there are a small number of pages that are updated frequently.

The second options is probably the most effective, you do the same as the big Internet search engines do. You have an independent process that periodically scans all your pages and compiles a database of key words. When the user submits the search form then you can go straight to the database to find the key words. This is *far* more efficient when the documents don't change very frequently compared to the number of search requests.

I think you will find scripts for both these approaches on the resourse I gave above.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question