Notification when download ends #3248
Replies: 2 comments 3 replies
-
Consider how you might do this for any file download? Can you do it if, for example, you did something like: $objInputStream = fopen("/my/textfile.txt", "rb");
$objTempStream = fopen("php://output", "w+b");
stream_copy_to_stream($objInputStream, $objTempStream); This isn't a PhpSpreadsheet-specific issue, not even a PHP-specific issue, but a general question about the The closest to a solution that I can suggest would be to send an additional header('Refresh: 10; URL=http://yoursite.com/thankYouForDownloadingPage.php'); But I make no guarantees about how effective this would be |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. And the header refresh does not work. I am already sending headers: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I download a file using $writer->save('php://output'); (after specifying the correct header), and it works well.
But I would like to be able to do more treatment when the download is finished, how can I do? I cannot send another header.
For instance, I need to hide a "wait" animated gif at the end, or to go to a specific URL.
I searched quite a lot and did not find.
Thanks for your suggestions
Beta Was this translation helpful? Give feedback.
All reactions