Search Engine for Website
Posted 24 April 2006 - 06:50 PM
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,
Posted 24 April 2006 - 07:26 PM
Posted 24 April 2006 - 08:47 PM
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.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users