I want to be able to search a single directory on my site... it's very important that it only produces results from the one directory (and it's sub directory's). Also, I want to host the entire script on my server... I get very edgy about relying on someone else's server... cause one day they may decide to close, or move stuff... I like to know where everything is! Anyone got any ideas on searching single directory (and sub directory's of that directory) script?
depends on what kind of files you have in that directory I would create a tmp table in mysql or your favourite db. Something along the lines of page title, description, url, score cycle through the files in your target folder, strip out any html do $relevence = $relevence+substr_count($file_content, $searchterm); insert the details for that page into your temp table. Then when you have gone through all your files select * from tmp table where relevance>0 order by relevence desc show the results drop the temp table That enough to get you going in the right direction?