We can create a search page for a dynamic website using Database queries and looping over resultant record sets. But what can we do if the website main contains static html files than dynamically populated content. In this case , we usually put Google search box inside website (Google custom search)
Sphider is a php based spider to crawl inside your own website and index all the pages as a Search Engine does. It makes search over static html pages simple. The script crawls through all links from basic home page and create an index file in your own local database.
Here is the website: http://www.sphider.eu/