Chris Mason wrote:
> I have an internal application requirement to generate a webpage that
> lists
> media files (movies) on our linux server and when the user clicks the name
> of the file on the webpage, launch the application on the local machine
> playing the correct file. How can I accomplish that? I know the computers
> that will be used, this is not on the internet so there are no security
> concerns. I can change and configure the browsers at will, this is a
> single
> purpose computer under my direct control on which I have installed the
> application.

The easiest and cheapest way, under those circumstances, is to turn ON the
directory listing feature in Apache in httpd.conf (or .htaccess) for that
directory and throw the video files in that directory.

You'll also get some free bonuses in cool little icons for the files, and
their sizes (sometimes important for video choice by a user) displayed.

If that bothers you, then a combination of:
http://php.net/opendir
http://php.net/readdir
and possibly http://php.net/readfile if you want to keep the video files
to live outside the web tree.
should make this a 5-line job of about an hour or two of work.

See the rather long thread about Security from the past few days about the
pros and cons of this.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to