Hi, this is my first thread and I am new to the whole web design business.

How could I make a pure PHP search engine to search the site that I am making? I don't want to use mysql just PHP, HTML and if I have to text files. I have tried to record information in text documents but I couldn't find a way to get the information.

I searched through php.net and all I found was a few string function that couldn't search the whole file, once it found the word I was looking for it stopped searching.

The first thing I need to know is how should I record the information without using mysql?

I have made the form that will gather the information I need and it sends it all to my email and the file it uploads gets sent to a folder named "assignments". There are nine fields, eight of them return text and the other file upload field returns what ever file is uploaded; there are no restrictions on the uploaded file and even if it is a text document I don't want the search engine to search it.

The second thing I need to know is how to search for the information?

I don't care if there needs to be a seperate file to store the information for each time something new is submitted. I have created a table using html and php which will be where the results go. Each part of the table echos a varible. If I can't put the code on the same page as the table which visitors will see then I also need to know how to get varibles from other files.

I want the most relivant information at the top of the table and to work out the relivance of the information I want the search engine to figure out what percentage of the document contains the words that the user searched for.

The last thing I need to know is what do I do when the search engine returns more results then I can fit on 1 page (there are 10 results per page)?

Thanks in advance to any one who answers my questions. This has been driving me nuts for the last week. I was tring to get the website live before the 20th of June but I didn't expect the search engine to be such a road block. It's the only thing left that I havn't finished. I have tried downloading search engines already made but they are not personilised enough, some of them contain foreign adverising and I can't edit them at all.

Thanks,

Tim

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.