Re: Tracking file download progress

From: Date: Thu, 24 Dec 2009 08:47:04 +0000
Subject: Re: Tracking file download progress
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-300661@lists.php.net to get a copy of this message
2009/12/24 STEEL <vlad62@mail.kna.ru>: > 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

« previous php.general (#300661) next »