Jump to content

Working with Quicktime files


getwiththeprogram

Recommended Posts

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 

Link to comment
https://forums.phpfreaks.com/topic/37184-working-with-quicktime-files/
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.