|
Posted by "bruce" on 09/26/08 11:27
if i may...
what exactly are you trying to do. are you simply trying to get a single
movie to stream... are you trying to get a better feel for how/what
streaming is?
-bruce
-----Original Message-----
From: Graham Anderson [mailto:grahama@siren.cc]
Sent: Friday, September 23, 2005 4:07 PM
To: php
Subject: [PHP] how to stream a movie file with fread
I am trying to stream a movie file with 'fread'
this my first step in trying to dynamically encrypt the file as it is
being streamed from the server
do I need to fread the data in chunks?
If so, how?
$filename ="$path2file";
$file = fopen($filename,'r');
$fileSize = filesize($filename);
$ContentType = " video/quicktime";
header ("Content-type: $ContentType");
header ("Content-length: $fileSize");
while( $filedata_temp = fread($file, $fileSize) )
echo $filedata_temp;
<b>Fatal error</b>: Allowed memory size of 16777216 bytes exhausted
(tried to allocate 24113191 bytes) in <b>xxxxxxxx/fopenTest.php</b> on
line <b>27</b><br />
BTW, I can get readfile to work just fine :)
AFAIK, readfile does not parameters to alter the file contents
many thanks :)
g
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[Back to original message]
|