Re: [PHP] Re: How to count transfered kBytes in File-Download

2009-01-04 Thread Eric Butera
On Sun, Jan 4, 2009 at 1:39 PM, Michelle Konzack wrote: > Hi Jim... ;-) > > The code: > > [ '/usr/share/tdphp-vserver/includes/02_functions.inc' ] > function fncPushBinary($type='show', $file, $mime='') { > >$BUFFER=1024; > >$HANDLER=fopen($file, r); > >$C

[PHP] Re: How to count transfered kBytes in File-Download

2009-01-04 Thread Michelle Konzack
Hi Jim... ;-) The code: [ '/usr/share/tdphp-vserver/includes/02_functions.inc' ] function fncPushBinary($type='show', $file, $mime='') { $BUFFER=1024; $HANDLER=fopen($file, r); $CUR_SIZE=0; while ( !feof($HANDLER) ) { $CUR_SIZE+=$BUFFE

[PHP] Re: How to count transfered kBytes in File-Download

2009-01-04 Thread Michelle Konzack
Hello Jim and *, Am 2009-01-02 21:12:58, schrieb Jim Lucas: > $current_size = 0; > while ( !feof($HANDLER) ) { > $current_size += $buffer; > echo fread($HANDLE, $buffer); > } This part is working now... ;-) But there is a problem: IF the user interrupt the download, the PHP scrip

Re: [PHP] Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Eric Butera
On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan wrote: > On Sat, 2009-01-03 at 13:27 +0100, Michelle Konzack wrote: >> Good morning Jim, >> >> Thank your for your help, I will now adapt my scripts and test it. >> >> And if a user had done a partial download, how can I set the pointer to >> resume

Re: [PHP] Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Ashley Sheridan
On Sat, 2009-01-03 at 13:27 +0100, Michelle Konzack wrote: > Good morning Jim, > > Thank your for your help, I will now adapt my scripts and test it. > > And if a user had done a partial download, how can I set the pointer to > resume the download? I personaly find websites offering downloads

[PHP] Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Michelle Konzack
Good morning Jim, Thank your for your help, I will now adapt my scripts and test it. And if a user had done a partial download, how can I set the pointer to resume the download? I personaly find websites offering downloads but not resuming very annoying, so I like to do it better... :-) I k