Track downloads' status


Posted on 16th Feb 2014 07:03 pm by admin

Hello,

I need to make somehow, some system, to track whether downloads are completed or failed. I tried to make this via php.

Tried to limit the connection speed for smaller downloads (to have the time to detect a cancel) (+ ignore_user_abort(true)) in a while where i also checked the connection_status.

/* dl headers */
ignore_user_abort(true);
while(feof($f))
{
echo fread($f,5*1024); /* 5 kb/s */
flush();
sleep(1);
if (connection_status()!=0)
exit();
}
/* track after the download */

Well it doesn't work because the browsers are waiting for script execution to end before popping-up the download dialog. So the users waits like 20-30 seconds, then the download dialog pops, and instantly saves the file.

So, probably the only solution is something to intermediate the download. If you know some Java/../.. component which can do this (no matter free or payed) would be nice.

Or maybe, somebody knows a way to do this from php.


Thank you

No comments posted yet

Your Answer:

Login to answer
160 Like 13 Dislike
Previous forums Next forums
Other forums

how to populate a drop down box
Hi buddies!

PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar) is begin DOWNLO

Material Issuing for receiving batch
Dear All experts in MM/ PP,

Material issuing from main stores to factory is currently usi

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make yo

Career Change into SAP
Hai
I am sajesh ,did my diploma in Mechatronics i have a 4 years of experience in

Help please - How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

Grids not displaying decimals, and behaving differently on different PCs?
Hello,

I coded a relatively simple MII application that allows data from a form to be add

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash