|
-
Dec 9th, 2004, 05:31 PM
#1
Thread Starter
Lively Member
redirect header, downloading files question
I need to write some sort of downloading system, I have the login and encryption complete. But the downloading of the file is where I have hit a wall. There can be no javascript, just in case the user has it off.
I need the system to redirect the user to a file for download, which I have accomplished, but then I need the rest of the scripts on the page to complete.
Is there a way to have the file downloaded and then pass control back the script so that it can remove the file and other various clean up?
Thanks
-
Dec 10th, 2004, 07:46 AM
#2
Re: redirect header, downloading files question
You could route the entire file through your script.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 10th, 2004, 05:21 PM
#3
Re: redirect header, downloading files question
Are you wanting the script to continue executing after you have sent the redirect header??
If so, then yes, this is possible, you need to make a call to the ignore_user_abort() function.
PHP Code:
ignore_user_abort(true); header('Location: newlocation.php'); /* rest of script here */
Be careful using this though as you will not recieve any notification of script errors and any output after the connection has been closed is lost in oblivion.
-
Dec 13th, 2004, 10:40 AM
#4
Thread Starter
Lively Member
Re: redirect header, downloading files question
Thanks, I will give it a try.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|