Ian Wayne wrote:
> 
[...]
> 
> /*retrieve filename from url*/
> $current=$REQUEST_URI;
> $url=parse_url($current);
> $fileq=$url[query];
> $file=$fileq.".mov";
> 
> /*force download*/
> header("Content-type:application/octet-stream\n");
> header("Content-disposition:attachment; filename=\"$file\"\n");
> header("Content-transfer-encoding:binary\n");
> header("Content-length:".filesize($file)."\n");
> 
> /*send file contents */
> $fp=fopen($file,"r");
> fpassthru($fp);
> 
> I can't tell you how long it's taken me to download anything and I'm still
> getting can't add header errors, but at least I'm downloading something. But
> how do I download the desired movie file....?

You don't need newline ("\n") at the end of your header....

R.

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

Reply via email to