Limit Daily Bandwidth?


#1

Hi, I was wondering is there some kind of .htaccess code which will allow me to limit the daily bandwidth per IP. For example, if that IP goes over it’s daily bandwidth, I’d like it to send them to a custom page telling them to come back tomorrow when their bandwidth is refreshed. This isn’t for a specefic IP, but for ALL visitors.

Thanks in advance!


#2

I know you can block specific IPs, but I can think of no way to limit their activity on the basis of bandwidth. You are basically talking about a form of traffic shaping.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

Well I know on some sites they will alert the user that they have reached their limit. Is there no way at all that I can do this? I know it’s possible, I just don’t know how it is done. Any help would be greatly appreciated.


#4

This can be done via apache modules which are not installed here. I found this on the interworx control panel forum which mentioned about bandwidth throttling. Actually they didn’t mention that specific purpose but I would assume that it would of been possible (they were talking about throttling based on filesize/filetype).


#5

Um well I have just finished developing my reseller software, where I fix this problem in away.

The problem I had:
Limiting folder bandwidth per a month.

Solution:
use PHP to access the DH daily logs and cache them into a db for easier access, also caching the file size of each file hit. Run this php command hourly via crontab, to attempt to get all files.

Use this calculation to calculate bandwidth:
filesize x # of requests
This will give it to you in bytes.

This code is not 100% accerate for my perpouse. Since it does cache the files hourly removing previous cached versions. If the file doesn’t exist any more it will then have a file size of 0bytes. Thats one way the system can be cheated.

If you want me to send you the code I will.


Use “DCOUNTME” promo code when registering and recieve up to $85 off! (referer: saygoodbye)


#6

I’d love to get that code, possibly with some dummy instructions on how to install it, if you offer’s still in effect. :slight_smile:


#7

I’m highly interested in this too guys, as some id**ts
are trying to download my whole sites

Please let me know if you tried something that worked …

Affordable logo, graphic design and web development
Spice up your cell - free Themes and ringtones