To search inside PDF files with PHP usually requires some sort of PDF-package to be installed on your server.
I wanted a simpler way and based this on a class from here: http://www.phpclasses.org/browse.html/package/702.html
I then did a quickie class that handles a very simple search in different kinds of files.
If the file is a pdf it uses the class pdf_search.
As you instansiate the class pass the following:
A valid path to the directory you want to search incl trailing "/"
A string of words to search for separated with a space.
(this class searches like this <word> OR <word> OR <word>...)
A 0 (zero) for non-recursive directory
I don't have time right now to be able to handle recursive searches from the given directory.
Last invoke the method searchInFile();
That's about it.
Oh, IMPORTANT!
This seems to work fine on Linux
BUT...
The pdf search part will not work on Windows, at least not with a default php 4.23 installation from phpdev. It either chrashes on the "gzuncompress()" or as it parses the regexp in the method textline()
Don't know why.