bandwidth restrictions

New to mod_rewrite? This is a good place to start.

Postby smgfan » Sun Jun 16, 2002 10:07 am

hey,

i was told that mod_rewrite had a way of allowing me to limit how much people can download from me in a given day. is this possible? i really want to put a 75 meg/day limit in for people who are downloading multimedia files off of my site.

if anyone can point me in the right direction on where i should go with this, i would be really thankful.

thanks
-mark
SMGFAN.com

<font size=-1>[ This Message was edited by: smgfan on 2002-06-16 14:07 ]</font>
smgfan
 
Posts: 1
Joined: Sat Jun 15, 2002 4:00 pm

Postby Brett » Mon Aug 05, 2002 1:01 pm

People sometimes talk of "bandwidth protection" with mod_rewrite, but as far as I know they are usually talking about preventing "hotlinking" from other sites.

On the other hand, you could do this:
-- use mod_rewrite so that requests for *.wav are handled by download.php
-- in download.php, determine the size of the requested file, and add that value to a variable stored in a cookie
-- if the user is past the limit, generate an appropriate error message
-- otherwise, use the header() command to generate the appropriate headers, and deliver the file.
Brett
 
Posts: 82
Joined: Tue Jul 10, 2001 4:00 pm
Location: yohost.com


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 26 guests

cron