Re: Tracking file download progress

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 2009/12/24 STEEL <vlad62@xxxxxxxxxxx>:
>> Hi all!
>> Here  is  the  problem: i have PHP script that takes URL of file from
>> client  and  downloads  it  to  my server. But when file is downloading,
>> clients  see blank page. How can I track file download progress on the
>> server  side(easier) and send result to client lively, to show it like
>> a progress bar in web browser?
>> Googled  around,  found  JQuery and JsHttpRequest, but can't understand
>> both for my task =) If everyone knows please give me some advice
>>
>> Best regards

> If I understand your question correctly, you cannot. PHP works on the
> server-side so once you've sent your HTTP response request, you are no
> longer in control. Besides, I don't know any downloading tool that
> doesn't already show a progress bar to the user. Even wget does so.

> You can of course track how much data *you* have sent, but that
> doesn't mean the client has downloaded all of it. It may for instance
> be that the client didn't finish downloading or that it is downloading
> slower than you are sending.

> -- 
> Daniel Egeberg

Thanks for response, but seems you haven't understood:
>> takes URL of file from client  and  downloads  it  to  my server.
User  don't download it at the downloading time to server, server gets
it thru PHP script and stores on itself!
ONly  i want is understand how to show progress bar to user. I have an
idea:  in  my  downloading  script in cycle add $_REQUEST['completed']
with  downloaded bytes, then at the client side via JavaScript(JQuery)
it will dynamically get data from backend variable. Would it work?



-- 
С уважением,
 STEEL                          mailto:vlad62@xxxxxxxxxxx


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux