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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

DataTable Help Required
Hi all I am creating an app that utilises and MS Access back end and queries it quite a bit at vario

PHP Session Issue
I'm having an issue with one section on my website dealing with sessions. Now I know that myself and

Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work

Which par

Why does first ever HttpSendRequest take longer?
I promise this isn't as simple as it sounds. I'm wondering why the the first ever call to HttpSendRe

Tracking Unique Clicks
Hi guys and gals,

Basically I have a database which tracks clicks on my outbound links, I do

Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of a

Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and

Multiple upload and Resize
I would like some help on my script I have the for my index.php

////

<html&

PHP form help required
Hi all! Apologies in advance for having to message the forum for help. I know you must get a lot of

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

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