Hi,
I am writing a small function to let user clicking the link and then read the .asf/.ra files from somewhere in order to prevent the user to download the link directly. The donwload seems ok but can't be streaming the files directly. i.e. I am only save as harddisk and view throught the files from harddisk. The following is the code:
$filename = "/somelinks/$filename";
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=$filename" );
}
else if ($mtype=="asf")
{
Header( "Content-type: application/vnd.ms-asf");
Header( "Content-Disposition:attachment;filename=$filename" );
}
fpassthru($fp);
fclose($fp);
}
Can Anyone help me.
Thanks a lot
mic