Original Post
Hello. Im currently making my CMS, and when I tried to design the downloads module, some questions popped up in my mind, probably they are not related at all with the CMS, but I still need some enlightening. 1. I dont understand why people would like to download several files from a server. Lets put an example, Slackware CD set (4 CDs). Pretend I try to download it from a very fast server, and my download speed is that of 100 kbps average (1 Mbps ADSL perhaps). a) If I try to download CD #1, Ill likely get full speed (100 kbps), what is the point of downloading 2 files at the same time? Wont I just get 50 kbps for each, in which case, isnt it the same downloading 1 at a time, than two? b) Now lets pretend the server is really slow, and I get a download speed of 25 kbps per file. Then, if I try to download 2 at the same time, will I get 25 kbps per CD, which means Ill be able to take full advantage of my download speed? Or do servers cap the download speed by IP/file (either one or both???) which means, 25 kbps is the max download speed I can get from that server (IP capping) or otherwise, I could download the 4 of them at the same time (file capping)? 2. Talking about bandwidth issues, how can I limit the bandwidth of an apache server, for example, to test it on a localhost level (and then check out the behaviour of the CMS when run in a slow server and such)? Maybe an http directive, or it goes way beyond of that... Maybe what Im implying is to play to be a hosting company, just for fun testing purposes... And while we are at it... How could I play to have several hosted sites... VPNs and a free solution like zpanel??? 3. I am aware of the technique, that you can put in practise, in php for example, when you stream the file to the client, rather than the client making a request to the HTTP server, which basically means you cant use a download manager to resume the file, as it is streamed by a script, and not by the server itself. Now, the question is, Ive seen some of those free file sharing services, and how they create their download links e.g http://server.org/files/12345/file.rar And the above link would be streamed by an script rather than sent by the http server. How can I do this? My thought (and I could be blatantly wrong), is to register several file extensions in apache, to be handled by the php module/CGI. That way, when requesting the example link, the client would be actually calling a php script rather than requesting the .rar from the server... Is this feasible? I think it could be at some extenct, but according to my knowledge, it would imply to copy a new script, then give it some random name (file.rar) whenever there is a new download... or is there a way to have a single URI to be handled by a same script (perhaps mod_rewrite)? Or how can I implement such behaviour? Maybe by means of using some directives in htaccess files, or...? Thats all I guess. Thanks a bunch for your time :)