Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2008-05-06, 07:02 PM   #1
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
I believe to do this you need to alter the content type of the file being served which requires a handler of sorts to do this which can then be hidden with an .htaccess. It will use more cpu than letting apache serve the file.

Code:
<?php
  header("Content-Type: video/x-ms-wmv");
  header('Content-Disposition: attachment; filename="test.wmv"');
  $file=fopen("test.wmv","rb");
  fpassthru($file);
  close($file);
?>
properly wrapped with a mod_rewrite, you could have it automatically parse and hand out files. Let me know and I can come up with something a little closer to what you want.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:43 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc