Hey, everyone
I am writing an php script that downloads a program based off a key that is passed in the address, my problem is that I need it to say completed once the download is complete or started. Currently the below code is executed from another page that shows "processing download"...
Basically, in the below code how could I make it echo "completed" once the download starts, or finishes. I did not include all of the code, but if it is needed I can, I think that the below shows exactly what i am trying to accomplish.
if (@fopen($Esofile, 'r')) {
$updat = "UPDATE downlinks SET downdt = current_date(), dwncount = dwncount + 1 WHERE linkkey = '$keycode'";
mysql_query($updat);
header('Content-Type: application/force-download');
header('Content-Disposition: attachment; filename=' . $custexe);
@readfile($Esofile);
//close the connection
mysql_close($dbhandle);
} else {
//close the connection
mysql_close($dbhandle);
echo "Error: ";
echo "Your link appears to be directed to a file that no longer exists, if you continue to receive errors contact Debtnet technical support for assistance.";
}
Thanks in advance