If you know what OS they use. Searching for folders/files is doable.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
I have a website that lists pdf files for downloading, with links to each file.
What I want to do now is design a search page that will look in the folder that contains these docs and search for docs that match a partial name.
I have created search pages for MySQL before - do I have to create a table with file names and links and then do a search of MySQL?
TIA,
jej1216
It is possible to search the directories for files using the PHP file functions like mentioned. See: http://www.php.net/manual/en/function.opendir.php
You'd get better performance by indexing the files in a db like you said, since searching database rows is much faster than scanning a directory, especially if you have many files.
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101
they can be exploited to form a DoS attack
servers which have PHP safe mode enabled (most hosted ones) dont allow these potentially dangerous commands
jbennet
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601