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

Using insert variable
need a way to inert variable data to mysql database

$acc = "212121212";
$nok =

Can we convert non uni code system into unicode
Hi All,

Presently i am using non-unicode system and the sap version is 4.7.
Can i c

Warning: mysql_num_rows() supplied argument is not a valid MySQL result resource
This may be simple I just may need another pair of eyes..

When i get records back the below c

Save remote XML to local website folder
Hi, I hope you can help me out. I would like to be able to pull an XML file from another site and t

FILTER_CALLBACK -- Files?
Hi All,

I'm using the php filter functions to validate my form data. For custom filters, I'm

onclick problem
I have <input type="text" name="message">
<a href=page2.

Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?

$playern

Adding to the next element in a multidimensional array
Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spo

TCP Sending Unsigned Char...
Hi...

I want to send over tcp/ip some data, i have the data in hexadecimal, and when i tr

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

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