Click here to Skip to main content
15,886,067 members
Home / Discussions / Web Development
   

Web Development

 
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
mve#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!
AnswerRe: Apache Server - throttle downloads Pin
Vasudevan Deepak Kumar7-Feb-07 4:33
Vasudevan Deepak Kumar7-Feb-07 4:33 
QuestionUsing Java Script as a security model to protect hidden fields Pin
Marcus J. Smith7-Feb-07 0:08
professionalMarcus J. Smith7-Feb-07 0:08 
AnswerRe: Using Java Script as a security model to protect hidden fields Pin
Bradml7-Feb-07 0:36
Bradml7-Feb-07 0:36 
JokeRe: Using Java Script as a security model to protect hidden fields Pin
blue_arc7-Feb-07 1:02
blue_arc7-Feb-07 1:02 
GeneralRe: Using Java Script as a security model to protect hidden fields Pin
Marcus J. Smith7-Feb-07 1:20
professionalMarcus J. Smith7-Feb-07 1:20 
GeneralRe: Using Java Script as a security model to protect hidden fields Pin
badgrs7-Feb-07 2:54
badgrs7-Feb-07 2:54 
GeneralRe: Using Java Script as a security model to protect hidden fields Pin
Vasudevan Deepak Kumar7-Feb-07 4:36
Vasudevan Deepak Kumar7-Feb-07 4:36 
GeneralRe: Using Java Script as a security model to protect hidden fields Pin
Marcus J. Smith7-Feb-07 1:23
professionalMarcus J. Smith7-Feb-07 1:23 
GeneralRe: Using Java Script as a security model to protect hidden fields Pin
User 98858-Feb-07 21:43
User 98858-Feb-07 21:43 
GeneralRe: Using Java Script as a security model to protect hidden fields Pin
Marcus J. Smith9-Feb-07 3:48
professionalMarcus J. Smith9-Feb-07 3:48 
AnswerRe: Using Java Script as a security model to protect hidden fields Pin
Guffa7-Feb-07 7:09
Guffa7-Feb-07 7:09 
QuestionDefinition error Pin
nclauder6-Feb-07 20:42
nclauder6-Feb-07 20:42 
AnswerRe: Definition error Pin
blue_arc7-Feb-07 1:20
blue_arc7-Feb-07 1:20 
AnswerRe: Definition error Pin
Sandeep Akhare7-Feb-07 1:36
Sandeep Akhare7-Feb-07 1:36 
GeneralRe: Definition error Pin
nclauder7-Feb-07 3:02
nclauder7-Feb-07 3:02 
GeneralRe: Definition error Pin
Sandeep Akhare7-Feb-07 3:08
Sandeep Akhare7-Feb-07 3:08 
AnswerRe: Definition error Pin
badgrs7-Feb-07 2:50
badgrs7-Feb-07 2:50 

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.