Re: Re: Re: How to count transfered kBytes in File-Download

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

 



2009/1/3 Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>:
> On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
>> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
>> <linux4michelle@xxxxxxxxxxxxxxx> wrote:
>> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
>> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
>> >> > I don't think this is actually possible. I've never seen it happen
>> >> > before. It would need some sort of dedicated client-side software to
>> >> > recognise exactly how much has been downloaded and then request the rest
>> >> > of it. A browser doesn't yet have this capability I believe.
>> >
>> > "wget" and "curl" support resum broken download...
>> >
>> >> $_SERVER['HTTP_RANGE']
>> >>
>> >> ???
>> >
>> > Hmmm, what is the value of this VAR?
>> >
>> > The BYTE where to start?  If yes, how can I include this in my script?
>> >
>> > I mean, if I fread() I must skip this ammount of BYTES  and  then  start
>> > sending, but how to skip it?
>> >
>> > Or I am wrong with fread()?
>> >
>> > Thanks, Greetings and nice Day/Evening
>> >    Michelle Konzack
>> >    Systemadministrator
>> >    24V Electronic Engineer
>> >    Tamay Dogan Network
>> >    Debian GNU/Linux Consultant
>> >
>> >
>> > --
>> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
>> > ##################### Debian GNU/Linux Consultant #####################
>> > <http://www.tamay-dogan.net/>               <http://www.can4linux.org/>
>> > Michelle Konzack   Apt. 917                  ICQ #328449886
>> > +49/177/9351947    50, rue de Soultz         MSN LinuxMichi
>> > +33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>> >
>>
>> I don't know how it works, just know of it.
>>
>> Maybe I'm misunderstanding you, but are you looking for fseek?
>>
>> http://us3.php.net/manual/en/function.fseek.php
>>
> Where does $_SERVER['HTTP_RANGE'] come from then, as I can't find
> anything about it online that actually says what it does, and when and
> what sets it. I can find lots of script listings that use it, but
> without knowing what it is, I don't know what to make of it.
>
>
> Ash
> www.ashleysheridan.co.uk

It's an HTTP header, sent in the HTTP request as Range: <byte-range>.
According to the CGI spec it's made available to CGI programs by the
server in the HTTP_RANGE environment variable, so PHP picks it up and
adds it to the $_SERVER array.


Torben

-- 
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