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

160 Like 13 Dislike
Previous php-forum Next php-forum
Other php-forum

Multiple Options for a Single Page
For this example I want to use the Handlers option which is under Fed Admin and all the related codi

what does this mean? +=
is anyone able to explain what this code is saying?

i had it written for me awhile back and n

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

Embed Video Problem
Hey, thanks for looking!

File to be embedded:

Code: <playlist version="1&q

include problem
I have my root folder as:
Code: $root = $_SERVER["SITE_HTMLROOT"]; // the server root<

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

Procedural to OOP
John Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pr

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

Online Event Ticket Sales
Has anyone wrote a script for online tickets sales?

I have been googling and found lots of th

Working with Dates, help.
Sooo to make a long story short, here's what im trying to accomplish.

I need to create a drop

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