Unfortunately cPanel doesn’t seem to provide much in the way of an api for programmers, or at least not for PHP.
Your best bet is probably to create a small shell script that counts these addresses and then call script that from PHP
The shell script might look something like this: find ~/mail | grep ‘@’ | wc -l
And the php might look like this:
$cmd = ‘/path/to/your/script.sh’; $output = array(); exec($cmd, $output); $mail_accounts = reset($output);
RSS feed for comments on this post. TrackBack URI
Name (required)
Mail (will not be published) (required)
Website
Currently you have JavaScript disabled. In order to post comments, please make sure JavaScript and Cookies are enabled, and reload the page.
Unfortunately cPanel doesn’t seem to provide much in the way of an api for programmers, or at least not for PHP.
Your best bet is probably to create a small shell script that counts these addresses and then call script that from PHP
The shell script might look something like this:
find ~/mail | grep ‘@’ | wc -l
And the php might look like this:
$cmd = ‘/path/to/your/script.sh’;
$output = array();
exec($cmd, $output);
$mail_accounts = reset($output);