how can i redirect page while download box appears?
Posted
by Ronnie Chester Lynwood
on Stack Overflow
See other posts from Stack Overflow
or by Ronnie Chester Lynwood
Published on 2010-03-27T13:48:32Z
Indexed on
2010/03/27
13:53 UTC
Read the original article
Hit count: 200
Now I got this code;
<?php
$file = "pain.png";
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>
This code appears a download box. But I want to redirect this page to "Thank You" page while download box still here. How can i do this?
Thanks...
© Stack Overflow or respective owner