Re: [PHP] Media file browser cache question --- second try

2004-09-20 Thread Marek Kilimajer
Daniel Guerrier wrote:
I'm using this code to dynamically retrieve windows
media files and send it to the browser.  I thought the
cache header would prevent the file from being cached.
The only problems is the .wmv file still ends up in my
IE temp files folder.  How can I prevent this from
happening?
The headers have influence on the asx file, .wmv files are served by the 
webserver (no php involved) and the webserver doesn't send no-cache headers.

You need to either:
1. Configure webserver to send the right headers for .wmv files.
2. Use php to send .wmv files, you can then send the headers from php

?php
require_once(../admin/constant.php);
header(Content-Type: video/x-ms-wmv);
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
 GMT);
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
header(Cache-Control: no-store, no-cache,
must-revalidate); 
header(Cache-Control: post-check=0, pre-check=0,
false);
header(Pragma: no-cache);
$file = DATAURL . /media/ . $_GET['mediafile'];
?
ASX VERSION=3.0
ENTRY
REF HREF =?php echo $file; ? /
/ENTRY
/ASX
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Media file browser cache question --- second try

2004-09-20 Thread Daniel Guerrier
And how would I do 
1. Configure webserver to send the right headers for
.wmv files.
--- Marek Kilimajer [EMAIL PROTECTED] wrote:

 Daniel Guerrier wrote:
  I'm using this code to dynamically retrieve
 windows
  media files and send it to the browser.  I thought
 the
  cache header would prevent the file from being
 cached.
  
  The only problems is the .wmv file still ends up
 in my
  IE temp files folder.  How can I prevent this from
  happening?
 
 The headers have influence on the asx file, .wmv
 files are served by the 
 webserver (no php involved) and the webserver
 doesn't send no-cache headers.
 
 You need to either:
 
 1. Configure webserver to send the right headers for
 .wmv files.
 
 2. Use php to send .wmv files, you can then send the
 headers from php
 
  
  
  ?php
  require_once(../admin/constant.php);
  header(Content-Type: video/x-ms-wmv);
  header(Last-Modified:  . gmdate(D, d M Y
 H:i:s) .
   GMT);
  header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
  header(Cache-Control: no-store, no-cache,
  must-revalidate); 
  header(Cache-Control: post-check=0, pre-check=0,
  false);
  header(Pragma: no-cache);
  $file = DATAURL . /media/ . $_GET['mediafile'];
  ?
  ASX VERSION=3.0
  ENTRY
  REF HREF =?php echo $file; ? /
  /ENTRY
  /ASX
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Media file browser cache question --- second try

2004-09-20 Thread Marek Kilimajer
Daniel Guerrier wrote:
And how would I do 
1. Configure webserver to send the right headers for
.wmv files.
Depends on your webserver.
For apache, place .htaccess file to the media directory with some Header 
directives, more here or on apache mailing list:

http://httpd.apache.org/docs/mod/mod_headers.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Media file browser cache question --- second try

2004-09-19 Thread Daniel Guerrier
I'm using this code to dynamically retrieve windows
media files and send it to the browser.  I thought the
cache header would prevent the file from being cached.

The only problems is the .wmv file still ends up in my
IE temp files folder.  How can I prevent this from
happening?


?php
require_once(../admin/constant.php);
header(Content-Type: video/x-ms-wmv);
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
 GMT);
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
header(Cache-Control: no-store, no-cache,
must-revalidate); 
header(Cache-Control: post-check=0, pre-check=0,
false);
header(Pragma: no-cache);
$file = DATAURL . /media/ . $_GET['mediafile'];
?
ASX VERSION=3.0
ENTRY
REF HREF =?php echo $file; ? /
/ENTRY
/ASX
---


I am streaming it.  That code is in an .asx metafile.
I assume it is supposed to work like a .ram for real
media.

Microsoft suggests using an asx file to stream media.
It does stream, I just do not want it to be cached in
my IE temp files.



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php