[quote]Is it possible to retrieve a variable somewhere so I can find out how much bandwidth I have and cut all my downloads once I detect a certain amount.
I wrote a cheesy little script a few months back that would graph the traffic on one of my domains on a daily basis.
The data that I used was stored in the domain’s log directory at /logs/yourdomainhere.tld/http/hits/.
This directory was being populated ever since I signed up last April, then mysteriously stopped working and had the old files deleted back on January 9th. After posting a similar question regarding the ‘new’ location of such traffic data here a week or so ago, it even more mysteriously started being populated again.
The files are named ‘bandwidth.YYYYMMDD’ and are added to the directory usually by 8:30 AM, server time.
There is one line in each of the bandwidth files, and in PHP it’s easy to retrieve the line, explode it, then use the fourth value, which is the byte total you want. You can iterate over whaterever timeframe you want to sum the data.
This, of course, assumes that this directory is working for you.
Here is an example of how I use the data to plot a traffic graph.