maksbd19
maksbd19

Reputation: 3830

Can I use php to search through some files?

I'm thinking of developing a site for my university courses where students can upload their own tutorials, how to, contents etc. Generally all the files will be plain written text and posted in my site. But sometimes there will be some course material and other things need to be stored which can be in doc, docx, pdf or any similar formats. PHP can read, write, search through files but if i need to search for contents I'll be needing to search through the files as well as databases. If there are thousands of files of different sizes to search through definitely it'll be time consuming and slower. Is there any possible solution to overcome this problem?

This is just an idea. I've found pdflib which provides similar functionality but I need more. Is there any chances to index my files to make the search faster?

Thanks in advance.

Upvotes: 1

Views: 214

Answers (1)

LHolleman
LHolleman

Reputation: 2596

You could use sphinx. It is made for searching in millions of lines of text so those few documents will be easy.

http://en.wikipedia.org/wiki/Sphinx_(search_engine)

Upvotes: 1

Related Questions