#!/usr/local/bin/php
<?php
$resellerList = json_decode(shell_exec("/usr/sbin/whmapi1 listresellers --output=json"), 1);
foreach ($resellerList['data']['reseller'] as $reseller) {
$priv .= "$reseller:1:USE,GREP,UNBLOCK\n";
}
file_put_contents('/etc/csf/csf.resellers', $priv);