List email accounts with PHP

freedog96150

Well-Known Member
Mar 25, 2005
68
0
156
Nevada, USA
I know that this is not a direct reply as I am not answering your question about PHP, but Chirpy has written an excellent script that cover what you are asking and more. Checkout Chirpy's WHM script at http://configserver.com/cp/cmm.html
 

HelloAdam

Well-Known Member
Nov 6, 2005
145
0
166
Hey,

You could use cURL, which will pull the information from the page and on to a PHP page. But theirs is no simple "command" that will do this...

From,
Adam
 

snakex

Member
Aug 21, 2003
5
0
151
Portugal, Porto
I'm working on it, so far i have this, it is working but if you view the source of the page you a lot of blank lines i can't get rid of hem :|

Code:
$page = file_get_contents("http://".$this->_user.":".$this->_pass."@".$this->_host.":".$this->_port."/frontend/".$this->_skin."/mail/pops.html");
$start_tag = 'Login';
$start_tag_pos = strpos($page, $start_tag);
$end_tag = 'Show Disk Space Used';
$end_tag_pos = strpos($page, $end_tag, $start_tag_pos);
$test = substr($page, $start_tag_pos+strlen($start_tag), $end_tag_pos-$start_tag_pos-strlen($start_tag));
$test = strip_tags($test);
$test = str_replace(' ', '', $test);
$test = trim($test);
$test = str_replace($this->_user, '', $test);
If any one as a better solution please let me know!

Thanks.
 

manderson

Registered
Jun 15, 2005
2
0
151
List of email accounts

I am also looking to export an entire list of email addresses from cpanel as I have postfix gateway servers I do address verification on ... Anything out there that can do this easily?

Thanks!