Click here to Skip to main content
15,913,264 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: XHTML and css Pin
Bradml7-Feb-07 23:00
Bradml7-Feb-07 23:00 
GeneralRe: XHTML and css Pin
User 98857-Feb-07 23:08
User 98857-Feb-07 23:08 
GeneralRe: XHTML and css Pin
Bradml7-Feb-07 23:12
Bradml7-Feb-07 23:12 
AnswerRe: XHTML and css Pin
Bradml7-Feb-07 22:32
Bradml7-Feb-07 22:32 
AnswerRe: XHTML and css Pin
szukuro8-Feb-07 1:29
szukuro8-Feb-07 1:29 
GeneralRe: XHTML and css Pin
User 98858-Feb-07 2:04
User 98858-Feb-07 2:04 
QuestionHelp in asp .net and mysql Pin
Rock Star.7-Feb-07 19:14
Rock Star.7-Feb-07 19:14 
AnswerRe: Help in asp .net and mysql Pin
badgrs8-Feb-07 0:53
badgrs8-Feb-07 0:53 
QuestionHelp in using media player control in C# Asp.net web application Pin
EEmaan7-Feb-07 18:37
EEmaan7-Feb-07 18:37 
AnswerRe: Help in using media player control in C# Asp.net web application Pin
Christian Graus8-Feb-07 0:36
protectorChristian Graus8-Feb-07 0:36 
GeneralRe: Help in using media player control in C# Asp.net web application Pin
EEmaan8-Feb-07 0:41
EEmaan8-Feb-07 0:41 
GeneralRe: Help in using media player control in C# Asp.net web application Pin
badgrs8-Feb-07 0:50
badgrs8-Feb-07 0:50 
GeneralRe: Help in using media player control in C# Asp.net web application Pin
EEmaan8-Feb-07 0:56
EEmaan8-Feb-07 0:56 
GeneralRe: Help in using media player control in C# Asp.net web application Pin
Christian Graus8-Feb-07 1:04
protectorChristian Graus8-Feb-07 1:04 
JokeRe: Help in using media player control in C# Asp.net web application Pin
User 98858-Feb-07 21:31
User 98858-Feb-07 21:31 
GeneralRe: Help in using media player control in C# Asp.net web application Pin
Christian Graus8-Feb-07 22:38
protectorChristian Graus8-Feb-07 22:38 
QuestionHelp in implementing cascaded style sheet in C# asp.net web applcation Pin
EEmaan7-Feb-07 18:32
EEmaan7-Feb-07 18:32 
AnswerRe: Help in implementing cascaded style sheet in C# asp.net web applcation Pin
Christian Graus8-Feb-07 0:37
protectorChristian Graus8-Feb-07 0:37 
GeneralRe: Help in implementing cascaded style sheet in C# asp.net web applcation Pin
EEmaan8-Feb-07 0:39
EEmaan8-Feb-07 0:39 
QuestionValidating an XML against a given XSD Pin
vsavarma7-Feb-07 17:38
vsavarma7-Feb-07 17:38 
AnswerRe: Validating an XML against a given XSD Pin
vsavarma7-Feb-07 17:39
vsavarma7-Feb-07 17:39 
QuestionIframe Development Pin
macca247-Feb-07 4:40
macca247-Feb-07 4:40 
AnswerRe: Iframe Development Pin
led mike7-Feb-07 4:50
led mike7-Feb-07 4:50 
QuestionApache Server - throttle downloads Pin
#realJSOP7-Feb-07 2:05
professional#realJSOP7-Feb-07 2:05 
AnswerRe: Apache Server - throttle downloads Pin
badgrs7-Feb-07 3:05
badgrs7-Feb-07 3:05 
I'm no expert in PHP or Apache but the following could be one way:

Firstly the URL for the file should point to a PHP script.

Using a text file with simply a number in it, each time the script runs it will open the file at the start of the script and check the number. If its over the limit script execution will end. If not it'll incriment the number and continue (at this point you'd also have to close the file handle to enable other requests to open it).

Set the Content-Type header to the type of file so the browser handles it correctly. Also set the content length to the size of the file.

To throttle the download speed, open the file to download in the script and read a limited number of bytes (I think the maximum you can actually read at a time is 4096, not sure on that though). Flush those bytes to the response and then suspend the script for a few hundred miliseconds, and repeat until the whole file has been sent. Not 100% sure on how this should be done to enable several multiple requests, it might be a case of reading the whole file at once into a byte array and closing the file handle before sending any response (ofcourse this depends on the size of the file and the amount of memory).

Open the text file again and decriment the number.

Thats just a rough guess, hope it helps!

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.