fgrep
and produces a list of links to the files that contain
the requested string.
To access the documents remotely use a URL like: http://gort.cscwc.pima.edu/ltaber/hl2/cgi_30.html
For each link display some of the text near the located word. Look at the material in CGI Programming by Gundavaram On the web at O'Reilly on pages 255-261. Make sure that you pre-process the search string and remove tags from the HTML prior to generating your new html.