do you have something like "article" texts in a database?
if so, let the user enter a search keyword, then do it like this:
select id,title from article where text like '%$keyword%'
from the resulting list, create a list of links.
if you don't have a database, you can search the text (html, whatever) files.
have a look at the dir object (it can read out the filenames in a directory). open each file and look into it using the stristr function. caution: can be slow!