Reply to Re: readfile_and_downloads

Your name:

Reply:


Posted by Cousin Stanley on 12/03/05 16:41

> Something like this would work,
> you have to put some logging features in.
>
> function download_file( .... )
> {
> ....
> fpassthru( $fdl ) ;
> ....
> }
>
> download_file( './test.csv' ) ;

Sean ....

Thanks for the reply and the example code ....

As a php rookie I wasn't aware of the fpassthru() function
so I checked my local php docs ....

Reads to EOF on the given file pointer
from the current position and writes
the results to the output buffer ....

This seems to work in a similar manner
to the readfile() function slurping up
the entire file ....

> That should work across fire fox and ie
> ( I don't know about safari or opera ).

Dealing with differences in various browsers
always hurts my head ....

Thanks for the reminder that I need
to keep these differences in mind ....

> ....
> I think processing only chucks of a file at a time
> could get very unnecessarily complex.

It will require a few more lines of code to write
and maintain, but in cases where the size of the
files to be downloaded is large and there are
multiple users attempting to get them at the same time,
maybe chunking the data across could help to keep
the server running smoothly ....

> If you are worried about performance
> why not set up your downloads as torrents?

I think there will be some alternate sites
offering torrent downloads ....

We have a limited monthly bandwidth limit
and want to try and distribute it out
evenly over the entire month ....


--
Stanley C. Kitching
Human Being
Phoenix, Arizona


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация