View Full Version : setup simple file browsing

04-21-2011, 12:34 AM

Simple question. I would like to be able to browse a directory (like when you go to a directory without a index.html) however when someone clicks on a media file I would like it to open in my custom web player. Any Ideas? Is this possible?

I have attempted to create a php file browsing system but it is becoming such a pain in the a$$. Ideally I would like to be able to create and index.html with a css so its not just plain white background, but I am looking to keep the file tree browse-able. Hopefully most of you know what I am trying to say. I feel like I am tripping over my tongue quite a bit here.


04-21-2011, 06:36 PM
I'm far from an expert but without some way to capture the user before they access the media file there won't be a way to redirect them. Using the PHP filesystem functions (http://www.php.net/manual/en/ref.filesystem.php) you should be able to write an index that will give you a directory listing of whatever directory you specify, then when the user clicks on the link to the media file redirect them to the page with your player.