Re: Download Video File and Play
- From: Michael Austin <maustin@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 18 Apr 2009 21:29:34 -0500
Harsha wrote:
Hello Everyone,
I am a new to php programming, please help me out with the following
issue which i am unable to resolve.
I am developing a site with flv videos on it. I am using JW player to
play the videos. When a user clicks the link, i want the video file to
be downloaded completely by the client machine and after downloading,
i want the player to get handle of it and play the file.
I don't want to stream the file. I tried using readfile() function,
but the file is downloaded in traditional method and stored in the
user's machine. Its like i streaming, but i want the video to play
only after completely streaming, in a way after downloading
completely.
please help me to use the right php functions to do this.
Thanks...
The first thing to learn here is that you have absolutely no control over what the "client" uses to play or view anything. You also have no control over whether they "play" the file or "save" the file. This is by design so that trojans cannot be easily installed and executed on their "client". Unless JW player is public domain, you may have licensing issues as well. They could have RealPlayer or whatever... There is no PHP function that will give you this control.
"downloading" the file is as easy as ensuring the proper content and disposition headers are sent...
If you are downloading an excel spread***:
header("Content-Type: text/csv");
header("Content-Disposition: inline; filename=excel.csv");
header("Pragma: no-cache");
header("Expires: 0");
.
- Follow-Ups:
- Re: Download Video File and Play
- From: Harsha
- Re: Download Video File and Play
- References:
- Download Video File and Play
- From: Harsha
- Download Video File and Play
- Prev by Date: Re: unable to insert data into table.
- Next by Date: Re: My function not find files to delete
- Previous by thread: Download Video File and Play
- Next by thread: Re: Download Video File and Play
- Index(es):