PHP5 Universal File Download Class

Written by Chris on August 12, 2008 – 12:16 pm -

After finding different hosting companies having wildly different policies when it comes to what's enabled and what isn't in PHP, I've built a generic file download class which should work in almost all situations.

This is the first version so there are some improvements to be made and if you download it, you'll see where some improvements may be made. I will be releasing another version when I've had time to do some further work on it. For now you can find the source code plus any community improvements here: http://www.refactormycode.com/codes/440-universal-file-download-class

I should also mention that this class has been cleaned of some application specific code, so if there's any disjointed bits I apologise - I have tried to deal with any discontinuities before posting but there may be something i've missed (this is also the reason for the bunch of if's in get_file() if you are to use this as is you may want to replace them with your own custom code).



Popularity: 82% [?]

Sphere: Related Content


Tags: , , , , , ,
Posted in PHP, Web Development | 3 Comments »
RSS

  • Translator

    English flagChinese (Simplified) flagChinese (Traditional) flagDutch flagFrench flagGerman flag
    Greek flagItalian flagJapanese flagKorean flagPortuguese flagRussian flag
    Spanish flag     
    By N2H
  • Also Find Me On

    Delicious  Digg  Facebook  Flickr  FriendFeed  Last.fm  LinkedIn  LiveJournal  Ma.gnolia  MyBlogLog  MySpace  StumbleUpon  Technorati  Twitter  YouTube  



  • Find job
  • Credit Cards
  • Online Advertising
  • Advertising
  • Mortgage