PHP Classes

PHP download manager

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  PHP download manager  
Subject:PHP download manager
Summary:Detecting number of connections to file or something like that
Messages:2
Author:Goran Bogdanovic
Date:2010-12-24 11:44:47
Update:2011-01-18 06:16:02
 

  1. PHP download manager   Reply   Report abuse  
Picture of Goran Bogdanovic Goran Bogdanovic - 2010-12-24 11:44:47
I write this days curl based PHP class that handle direct and remote uploads/downloads http, https, ftp, ftps in all possible variations. I almost finish but I have just one problem direct download I manage to implement byte serving, ranges, resume download, speed limit... Only thing I do not know how to resolve is DOWNLOAD MANAGERS. What is problem when I use download manager let's say FlashGET he opens 1th connection and do not send Range header so class resolve it as regular download in all other connections he send one range eg bytes=111112- so class see it as one range, not multi range download, so I can not use header("Content-Type: multipart/x-byteranges")

That leads that at last everything is working but I have speed limit problem.
Every connection have speed limit let's say 50 KB/s so final limit is 5x50 and that is 250KB/s.

I do not have clue how to solve that. One idea is to collect headers and time and if connections are made in 2 seconds to reduce speed limit. Other solutions could be over Apache but not practical.

Any help would be great. Curl use CURLOPT_WRITEFUNCTION and callback fr download serving, and CURLOPT_RANGE for range downloads.

Thanks in advance Merry Cristmas and Happy New year.

There is 1 reply in this thread, which is not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.