nick1 Posted April 24, 2006 Share Posted April 24, 2006 Greetings,Well, as the subject of this thread says. I'm wanting to create anoption on my website that allows visitors to search the entire site forthe phrase they enter into a form. Clicking the submit button will fireoff 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 prefernot 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 Quote Link to comment Share on other sites More sharing options...
rab Posted April 24, 2006 Share Posted April 24, 2006 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. Quote Link to comment Share on other sites More sharing options...
waffle72 Posted April 24, 2006 Share Posted April 24, 2006 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 fileYou do a read in one variableYou search your string in that variableIf your string exits, you put the name of the file in a array[/blockquote]You display your array as resultThe 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.