Hello,
I have a download manager that grants privelaged users access to non HTTP accessable files. I was wondering if its possible to detect in the part of the script if the file download is terminated. So for example the user accidentally hits the cancel button on the download dialouge box. So far, this is what i am doing:
if ($file = fopen($path, 'rb'))
{
while(!feof($file) && (connection_status() == 0))
{
print(fread($file, $transferAmount));
$bytesSent += $transferAmount;
flush();
}
$status = $bytesSent;
fclose($file);
}
i was under the assumption that
connection_status() '
could indicate to the script that the connection was lost due to the cancel button being hit. Am I misled?
If so is there a way?
Billy