Jump to content


Photo

Search Engine for Website


  • Please log in to reply
2 replies to this topic

#1 nick1

nick1
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 24 April 2006 - 06:50 PM

Greetings,

Well, as the subject of this thread says. I'm wanting to create an
option on my website that allows visitors to search the entire site for
the phrase they enter into a form. Clicking the submit button will fire
off the search and return links to pages that contain their search phrase.

Do you know of a way to create this using just HTML or PHP? I'd prefer
not to use a MySQL database or some third party software/script. I'd like to write my own script and keep it simple as possible. Any advice would be greatly appreciated.

Thank you for your time,

Nick

#2 rab

rab
  • Members
  • PipPipPip
  • Advanced Member
  • 155 posts

Posted 24 April 2006 - 07:26 PM

You could parase your HTML files and compair the read words. I do think there is a function to compair similair strings, I just can't remember it.

#3 waffle72

waffle72
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 24 April 2006 - 08:47 PM

I am not an expert but I think that a way to do it would be has follow :
in a loop for each html file :
[blockquote]You do a fopen of your html file
You do a read in one variable
You search your string in that variable
If your string exits, you put the name of the file in a array
[/blockquote]You display your array as result

The problem is that you have nothing to follow the link in a page so you if you have only html pages it should work. No dynamic call of include for exemple.

God luck






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users