ispCP - Board - Support
PHP based Disk and Traffic report - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Enhancements (/forum-43.html)
+--- Thread: PHP based Disk and Traffic report (/thread-10381.html)



PHP based Disk and Traffic report - crafter - 04-13-2010 06:32 AM

The attached PHP script sends users and resellers information about the traffic and disk usage for their registered domains.

The script is normally meant to run once a day. Each domain is queried and the current resource usage is calculated against the allocated limits.

If the resource limit is exceeded, then the domain contact is sent an email, alerting them to the resource usage.

In addition, reseller accounts are sent a daily email that provides the resource usage for each administered domain, and a total against the resource limits allocated to the reseller.

Usage Notes
The tool is intended to run from the command line as a PHP script.

An example of this is :
Quote:php /var/www/ispcp/engine/tools/usage_reports.php

You can guess that I installed the script in var/www/ispcp/engine/tools/usage_reports.php

As an example, to run the script at midnight, add the following line to the file
/etc/cron.d/daily/ispcp
Quote:# resource usage - send email to customer - added by Pradesh - 2009/11/07
@daily root php /var/www/ispcp/engine/tools/usage_reports.php &>/var/log/ispcp/usage_reports.log




RE: PHP based Disk and Traffic report - idento - 11-10-2010 08:26 PM

Hi i have this error:


Parse error: syntax error, unexpected $end in /var/www/ispcp/engine/tools/usage_reports.php on line 344