mirror of
https://github.com/getnamingo/registry.git
synced 2025-06-27 22:53:34 +02:00
Further enhancements
This commit is contained in:
parent
4d1e6f908e
commit
73b0ab2f51
2 changed files with 8 additions and 2 deletions
|
@ -24,6 +24,7 @@ return [
|
|||
'escrow_report_password' => 'your_password',
|
||||
|
||||
// Reporting Configuration
|
||||
'reporting_path' => '/opt/reporting',
|
||||
'reporting_upload' => false,
|
||||
'reporting_username' => 'your_username',
|
||||
'reporting_password' => 'your_password',
|
||||
|
|
|
@ -21,6 +21,11 @@ $query = "SELECT tld FROM domain_tld";
|
|||
$tlds = $dbh->query($query)->fetchAll(PDO::FETCH_COLUMN);
|
||||
|
||||
foreach ($tlds as $tld) {
|
||||
// Skip TLDs with a dot inside, apart from the beginning
|
||||
if (strpos(substr($tld, 1), '.') !== false) {
|
||||
continue; // Skip this iteration if an additional dot is found
|
||||
}
|
||||
|
||||
// Initialize activity and transaction data arrays for each TLD
|
||||
$activityData = [];
|
||||
$transactionData = [];
|
||||
|
@ -158,8 +163,8 @@ foreach ($tlds as $tld) {
|
|||
|
||||
// Write data to CSV
|
||||
$tld_save = strtolower(ltrim($tld, '.'));
|
||||
writeCSV("/tmp/{$tld_save}-activity-" . date('Ym') . "-en.csv", $activityData);
|
||||
writeCSV("/tmp/{$tld_save}-transactions-" . date('Ym') . "-en.csv", $transactionData);
|
||||
writeCSV("{$c['reporting_path']}/{$tld_save}-activity-" . date('Ym') . "-en.csv", $activityData);
|
||||
writeCSV("{$c['reporting_path']}/{$tld_save}-transactions-" . date('Ym') . "-en.csv", $transactionData);
|
||||
|
||||
// Upload if the $c['reporting_upload'] variable is true
|
||||
if ($c['reporting_upload']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue