On Wed, 22 Aug 2001 10:19, AD wrote:
> Hi,
>
> I'm working on a download script
>
> header("Content-Type: application/octet-stream\n");
> header("Content-Length: $size\n");
> header("Content-Disposition: attachment; filename=\"$file\"\n");
> header("Content-Description: Download\n");
> readfile($path.$file);
>

header( "Content-Type: application/download" );
if (strstr(getenv('HTTP_USER_AGENT'), 'Netscape6' ))
        header( "Content-Disposition: attachment; filename=chopper.exe" );
else
        header( "Content-Disposition: filename=chopper.exe" );
$fn=fopen( "chopper.exe" , "r" );
fpassthru( $fn );

This was as close as I ever got. Still doesn't work in Konqueror but is an 
acknowledged bug.

Cheers,
Brad

-- 
Brad Hubbard
Congo Systems
12 Northgate Drive,
Thomastown, Victoria, Australia 3074
Email: [EMAIL PROTECTED]
Ph: +61-3-94645981
Fax: +61-3-94645982
Mob: +61-419107559

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to