PDA

View Full Version : Monitor bandwidth on sub accounts?



engine102
06-19-2007, 01:17 PM
Hello all!

I have been searching around, and wondering if there is a way to monitor the bandwidth, or restrict it like a VPS server would allow me to do.

I want to restrict the download bandwidth of a couple of sites to 1gb per month, and the storage size isn't a big deal.

Asking in the help section and browsing the knowledge base didn't offer any help.

Is this possible? The sites are installed in subdirectories, and are not the main site, they are addon domains.

Thanks in advance!

RDM
06-19-2007, 02:13 PM
you cannot do this with a shared hosting account

engine102
06-24-2007, 10:43 AM
Ok, thanks for the info....I didn't think I could, but just wanted to check!

sjlplat
06-24-2007, 01:50 PM
This can be done with PHP, but you would have to include a PHP script on every page of the site (easily done if you use a static header template). Calculate the file size each time a page is accessed, and add it to a database. When the filesize maximum is reached, disallow access to the site, using the very same script by delivering a "exceeded maximum monthly bandwidth" message to your visitors.

If you want to restrict file downloads, calculate the size of the files, and add that to a database. Add the filesizes up each time a file is downloaded. When the maximum download capacity has been reached, stop allowing downloads.