--- Lowell Allen <[EMAIL PROTECTED]> wrote:
> You must do authorization, then force a file download, and you want to
> also display a link to the file with the typical "click the link below
> if the download does not start automatically". I couldn't figure out how
> to display a page (after authorization), then use the PHP header
> redirect to force the download while keeping the same page display.
> However, using a meta refresh to a script that forced the download
> (without producing any display) was an easy solution.
> 
> Am I overlooking a better solution?

I'm not sure. To be clear, you're saying that the following two things do
not behave the same for you:

header('Refresh: ...');

<meta http-equiv="Refresh" ...>

Is this right? I suspect that you might be comparing these instead:

header('Location: ...');

<meta http-equiv="Refresh" ...>

If this is the case, the difference in behavior is due to:

1. Different headers.
2. Different response status codes (setting a Location header also changes
the status code from 200 to 302).

If this is not the case, I'm honestly not sure why the behavior would be
any different, since browsers that support http-equiv are supposed to
interpret these exactly as if they were real headers.

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
     Coming mid-2004
HTTP Developer's Handbook - Sams
     http://httphandbook.org/
PHP Community Site
     http://phpcommunity.org/

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

Reply via email to