• Check out all the best Amazon Prime Day deals 2021 here!

Help with PHP/mySQL/Indexing Files

Pyroflea

Distinguished
Mar 18, 2007
341
0
18,930
0
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 :p 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.

If you need any more information just lemme know.

Thanks,


- Jesse
 

Pyroflea

Distinguished
Mar 18, 2007
341
0
18,930
0
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?

Thanks,


- Jesse
 
Thread starter Similar threads Forum Replies Date
A Apps General Discussion 2
Achint2000 Apps General Discussion 7
S Apps General Discussion 1
S Apps General Discussion 3
I Apps General Discussion 1
N Apps General Discussion 5
S Apps General Discussion 1
D Apps General Discussion 1
ebmurray21 Apps General Discussion 2
I Apps General Discussion 11
M Apps General Discussion 1
B Apps General Discussion 5
J Apps General Discussion 2
L Apps General Discussion 6
O Apps General Discussion 1
MEMOFLEX Apps General Discussion 1
D Apps General Discussion 3
D Apps General Discussion 1
devilhanzou Apps General Discussion 4
Y Apps General Discussion 1

ASK THE COMMUNITY