icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old September 27th, 2006, 3:13 AM   #1 (permalink)
Bow before Surpass!
Super #1
 
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
Streaming Video via Root?

Hello,

I've been trying to use root locations for streaming movies... using the following:

Code:
<embed src="/home/gaminghy/media/videos/tgs2006/lostplanet_part1.mov" width="640" height="480" autostart="true" loop="false"></embed>
However, the source is right but it seems to not load. This could be because it will not go into the root folders and only to the /public_html/ files. I'm trying ot offer this option to my visitors as a way to stream videos while protecting the files from download/hotlinking. I can make it so they can download the file, but I can't seem to have it allow streaming via <embed>.

Any ideas? Thank you!
__________________
GamingHybrid is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 27th, 2006, 10:30 AM   #2 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
HTTP can not access files outside of /public_html/ so you will need to use PHP (or some other scripting language) to serve the file to the user.
PHP Code:
<?php
    $filename 
"file.mov";
    
$dir "/home/username/path/to/files/"// include trailing slash
    
$filesize filesize($dir.$filename);
    
header("Pragma: public"); // required
    
header("Expires: 0");
    
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    
header("Cache-Control: private",false); // required for certain browsers
    
header("Content-Disposition: inline; filename=\"".$filename."\";");
    
header("Content-Transfer-Encoding: binary");
    
header("Content-Length: ".$filesize);
    
readfile($filepath);
?>
There's a very basic one; extend as you need.
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 2nd, 2006, 12:33 AM   #3 (permalink)
Bow before Surpass!
Super #1
 
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
Thanks for the input. Now, the issue I'm having is that I wish for the video player to be on a certain part of the page at one absolute width/height... hence the <embed> attempt.

Thanks.
__________________
GamingHybrid is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

« Help | Timezone »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On