<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Is there any way to print the number of email accounts in cpanel using php?</title>
	<atom:link href="http://www.emailing4free.com/2010/03/is-there-any-way-to-print-the-number-of-email-accounts-in-cpanel-using-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emailing4free.com/2010/03/is-there-any-way-to-print-the-number-of-email-accounts-in-cpanel-using-php/</link>
	<description></description>
	<pubDate>Sat, 19 May 2012 02:55:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Josh</title>
		<link>http://www.emailing4free.com/2010/03/is-there-any-way-to-print-the-number-of-email-accounts-in-cpanel-using-php/#comment-3110</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Wed, 10 Mar 2010 04:37:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.emailing4free.com/2010/03/is-there-any-way-to-print-the-number-of-email-accounts-in-cpanel-using-php/#comment-3110</guid>
		<description>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 &#124; grep '@' &#124; wc -l

And the php might look like this:

$cmd = '/path/to/your/script.sh';
$output = array();
exec($cmd, $output);
$mail_accounts = reset($output);</description>
		<content:encoded><![CDATA[<p>Unfortunately cPanel doesn&#8217;t seem to provide much in the way of an api for programmers, or at least not for PHP.</p>
<p>Your best bet is probably to create a small shell script that counts these addresses and then call script that from PHP</p>
<p>The shell script might look something like this:<br />
find ~/mail | grep &#8216;@&#8217; | wc -l</p>
<p>And the php might look like this:</p>
<p>$cmd = &#8216;/path/to/your/script.sh&#8217;;<br />
$output = array();<br />
exec($cmd, $output);<br />
$mail_accounts = reset($output);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

