getwiththeprogram Posted February 5, 2007 Share Posted February 5, 2007 I'm not sure if this is the appropriate forum to post this question but here goes. I need to give members to my site the option to either view (play), or save to their hard drive .mov files. I want to know how do those sites that sell audio/video media create those links that let you play the file (preview before you buy button usually) Is it a software that enables this function? Thanks Quote Link to comment Share on other sites More sharing options...
ultrus Posted February 7, 2007 Share Posted February 7, 2007 Hello getwiththeprogram, I'm 70% sure about the following: If you don't have Quicktime professional version, and have a quicktime video embedded in the page, you can watch the file without option of downloading it. However, it may still download to your browser cache? (not sure on that part). If you have the professional version of Quicktime, you also have the option of saving the file as something from the player itself. If you link to this file directly, left clicking on the link will take the browser to a "page" that plays the video. Right-clicking wil give the option to download the file. One way that people protect their videos while on the site is making the samples Flash video. It gives less playback and saving options. To force a download in php, I found the following through a google search, adding my own small touches: http://lists.evolt.org/archive/Week-of-Mon-20050214/169427.html <?php //make sure this is near the top of your script before data is sent to the browser $filepath = "movies/movie.mov"; $filename = "movie.mov": Header( "Content-Type: application/octet-stream" ); Header( "Content-Length:" . filesize( $filepath ) ); Header( "Content-Disposition: attatchment; filename=$filename" ); readfile( $filepath ); ?> Take care Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.