Results 1 to 1 of 1
Oct 10, 2009, 12:38 #1
- Join Date
- Oct 2009
- 0 Post(s)
- 0 Thread(s)
Local drive (without webshare) file and folder search trough the webpage
I'm trying to find some solutions for my issue.
I wanted to made an local or external webpage on the webserver which is in fact file server, with the simple php web page with the search bar with the input, field and that page needs to output the search results in the text form or in any other form. I mean the goal is to get searched files or folders and where is their location.
I had couple of ideas, but I cant workaround any of them successfully, I would like to list all of my ideas and I would like that some of the pro users would tell me did they stumble across the similar codes or solutions or even complete projects or eventually the tools or application which have what I need.
The platform is the file server on ubuntu server or debian server or freebsd server
The best and easiest way would be if there is some php coding and connections toward Linux commands like "locate", slocate" or "rlocate", because those commands were connected to the indexed db of files and folders already, the best way would be with the rlocate because its in the fact the real-time, because of the kernel traps.
How could I make a php code, that would connect to the command like rlocate or locate,
I'm not sure how much secure would be to connect php with rlocate or is it even possible at all. I mean its important that system security is not compromised because the web server could have access to such system command as locate.
I've searched trough 7-8 pro php books and I cant find any connection to locate or slocate or rlocate with php. Are there any?
This is the first way, the second way would be to use some loadless "file and folder indexer", which could collect the folders structure to some database, and than the web server would connect to that db. I mean there would be an external web page with the search bar and output would be in textual form or in any shape I dont care, its important that I get advanced file and folder searcher which will produce at least load on the server.
Some people said to me that they know that there are some complete project but they cant remeber the names of those projects and tools.
The third and the worst way would be if I would use SPL file and folder handling within newest versions of PHP 5.3 and above
I mean its the worst solution which would make enormous load , and it would need a lot of time to search folder structure of 500.000 files in the mass number of folders and subfolders.
Here is rough code that I had in mind:
Thanks in advance.