I've recently been working on a program to teach myself PHP, and it's grown a bit more than I originally expected it to. Long story short, I'm now working on implementing a search engine. The plan is to simply display the contents of my home server, but I'd like a search to prevent having to scroll through thousands of files.
I've been doing some reading, and realize that I need for there to be a database of the files hosted on the server. I made a mySQL table with values such as name, extensions, etc., but I need to figure out how to automatically scan through all files in a given directory, and add the appropriate information to it's corresponding column on the table.
My research hasn't been going too well, due mainly to the fact that I don't know the proper terms and jargon to even search properly What I'm mainly looking for is just what I should be searching for, any links to beneficial articles, or even any help that you may have to offer.
Alright, well I did make some progress. I managed to write a script to do a recursive scan of the specified directory, and then post the name of the file, the path of the file, and the extension of said file. The ID is also auto-incrementing.
Anyways, I'm not sure how to go about automating this still. Can I set up a cronjob to just run this *.php script that I wrote, or is there more to it than that?