Redirect after HTTPResponse send.
Posted: Wed Dec 03, 2008 2:07 pm
Hi,
How can i redirect to a different page after my download started.
Here is my code.
HttpResponse::setCache(true);
HttpResponse::setContentType('application/octet-stream');
HttpResponse::setContentDisposition("abc.exe", false);
HttpResponse::setFile(realpath('./abc/abc.exe'));
HttpResponse::send();
ob_flush();
flush();
sleep(1);
header("Location: http://yahoo.com"); // here i want to redirect to a page after download started. But this is not working.
How can i do this?
Thanks
How can i redirect to a different page after my download started.
Here is my code.
HttpResponse::setCache(true);
HttpResponse::setContentType('application/octet-stream');
HttpResponse::setContentDisposition("abc.exe", false);
HttpResponse::setFile(realpath('./abc/abc.exe'));
HttpResponse::send();
ob_flush();
flush();
sleep(1);
header("Location: http://yahoo.com"); // here i want to redirect to a page after download started. But this is not working.
How can i do this?
Thanks