Hi,
I am currently writing a code only allowing the member to download the .asf movie or .rm movie which movies will not locate at the public_html but in somewhere that member's cannot access from http. However the download seems ok but cannot streaming the movie in real time. Can anyone help?
// $mtype represent the file type
if (!$fp = fopen($filename,"r"))
{
echo ("Could not find this file");
}
else
{
if ($mtype=="rm")
{
Header( "Content-type: audio/x-pn-realaudio");
Header( "Content-Disposition:attachment;filename=$thisfile" );
}
else if ($mtype=="asf")
{
Header( "Content-type: video/x-ms-asf");
Header("Content-Disposition:attachment;filename=$thisfile");
}
while (!feof($fp))
{
$output = fgetc($fp);
echo $output;
}
fclose($fp);
exit();
Thanks a lot