Re: Closing my Window after Download

From: Date: Wed, 01 Sep 2004 12:39:10 +0000
Subject: Re: Closing my Window after Download
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-195384@lists.php.net to get a copy of this message
Ave, Which page do you give this code in? For example, I have a page admin.php .... Therein is the link on which, when a user clicks, a window "admin_dl.php" opens. The "admin_dl.php" contains my force-download code and it is that window that I'm trying to close. If I specify this following code in admin.php itself, would it work? Admin.php does contain a lot of other stuff too. On 8/31/04 6:31 PM, "hitek@cox.net" <hitek@cox.net> wrote: > header("Content-Type: application/force-download"); > header("Content-Type: application/octet-stream"); > header("Content-Type: application/download"); > header("Content-Type: $mimetype"); > header("Content-Disposition: attachment; filename=filename.ext"); > header("Content-Transfer-Encoding: binary"); > header("Accept-Ranges: bytes"); > header("Content-Length: $filesize"); > $fo = fopen("/path/to/filename.ext","r"); > fpassthru($fo); > fclose($fo);

« previous php.general (#195384) next »