Hi,
I don't see anything wrong with Nathan's reply to your previous question on this topic.
Anyway, there are many ways to build your own search engine. And it's a bit too much to show you the exact coding for it. There are however complete sources freely available from sites like http://www.hotscripts.com
You could use proper keywords on each HTML page where your search engine would look for, (use PHP function "get_meta_tags()")
You could also use a database, like MySQL to contain your text and have your search engine search the tables for keywords.
Then there's always Nathan's method and optionally combine this with something like an "admin" page which you use regulary to update your searchengine. Have your admin page scan all html files for anything between <p></p> tags (in conjunction with eregi) and put the results in a database, where the user side of the search engine get's it's info from.
You could make this easier for your search engine btw, by putting in special comment tags like:
<!-- TOPIC what's a search engine //-->
<p>So how do you build your own searchengine one might ask himself</p>
<!-- END TOPIC //-->
Now you could build a script that strips any thing between <!-- TOPIC and END TOPIC //--> and put that (optionally) in a table or perhaps just a text file.