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

Php - mysql select?
hi, i have this code:

Code: <?php
session_start();
// dBase file
include &quo

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

BAPI BBP_INB_DELIVERY_CREATE - material number missing in delivery
Hi Experts,

I was able to successfully create an Inbound delivery with reference to a PO

Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g

redirect standard error and assert (how to?)
How do you redirect standard error and assert?

---

(Why? I am creating an web app and

Not capturing all the information we require in the form.......
Hi Guys,

I was wondering if you would share some more of your knowledge today, I'm hoping it

Small problem with image resize script
Hi!

I am a little bit new to php and I have an issue installing an image resize script I down

php wont update my db
hello,

sorry for posting in mysql forum but i dont know where exactly is the problem but here

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

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