With this script you can send an e-mail report with a hourly DNS statistics for the last month for a list with DNS zones. You can download it from here.
AUTH_ID should be your API user ID AUTH_PASS should be the password of your API user.
In the $dns_zones variable you have to add a list with DNS zone names for which you want to get reports.
In the $mail_to variable you have to add a list with e-mail addresses where you want reports to be send.
In the $mail_from variable you have to add an e-mail address from which the reports will be send.
// list with the DNS zones you want to get reports
$dns_zones = array(
// list with the e-mails where will be send the reports
$mail_to = array(
// e-mail which will be used for the sending of the reports
$mail_from = 'firstname.lastname@example.org';
When you are ready with your configuration, you can run the script with the following command:
The script will output a list with the domain names for which the reports are generated and sent.
If your API user ID or Password are incorrect, you will get an error message. If you have entered an invalid DNS zones in the list, you will get an error message.
You can add this script to be executed each first day from the month. Example:
0 0 1 * * /usr/bin/php /path/to/last-month-hourly-stats.php >/dev/null