View Single Post
Old 11-09-2011, 04:18 PM  
Bladewire
StraightBro
 
Bladewire's Avatar
 
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,229
Quote:
Originally Posted by raymor View Post
Do NOT read and print videos in PHP. Similar code in PHP almost always has three major bugs.
Instead set the headers in the .htaccess.
Smokey did manage to halfway avoid one bug, so his implementation has only 2 1/2 major issues. That's definitely better than most people do.

Still remaining is the big which for about a year caused one popular CMS to crash servers fairly regularly and this code too will crash your server when it gets busy. It also has a glaring security hole.
WOW ouch! Thanks for the tip Ray I appreciate that.

Quote:
AddType application/octet-stream .mp4

<FilesMatch "\.(docx?|txt|mp4?)$">
Header add Content-Disposition "attachment"
</FilesMatch>
The above code seems to do the trick in browsers with the longtail video player.

However on my IPad no video shows, only the "download" graphic appears, and when clicked on, it plays the video.

On my Android phone no video shows, only the "download" graphic appears, and when click on, it downloads the video to the phone without viewing.

So maybe if I adjust the longtail player setting to be html5 compatible it could fix this problem?

Thanks for your input I really appreciate it
__________________


Skype: CallTomNow

Bladewire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote