I am trying to make a page where a user will have access to download a file.When the user enters the password and clicks a link the first page includes the download.php and the download begins.I want the download to start AND the user to be redirect to another bage.
Till now I can either relocate the user or start the download depending on the place of the Location Header.
Any ideas to correct this or make it with some other way?
This is the download.php.
<?php
$file = "jhgfbugckrcgnk";
$name = "ExPlusVer1.1.1.18.exe";
$size = filesize("$file");
//header("Content-Type: application/ms-x-download");
header("Content-Type: application/octet-stream");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=$name");
header("Content-Transfer-Encoding: binary");
header("Location: http://www.e-forologia.gr/");
$fh = fopen("$file", "r");
fpassthru($fh);
exit;
?>