Hi Guys,
I've been bugging myself for more than a week now trying to do a relative simple thing , (at least i tought it would be). I need to produce a list of all active e-mail adresses on my DA machine to hand over to the Dutch District of Justice daily.
I'm trying to do a user listing, then list domains per user then list e-mails per domain. That wouldn't work for me , so i tried it simpler which also didn't work.
I kept getting the following error :
Array ( [error] => 1 [text] => Could not excute your request [details] => You do not own that domain )
Thats a printout from the fetch_parsed_body() method which i use to capture the output.
I've tried to print a list of users trough the API which worked without problems, but when i try to print a list of e-mails per domain it always gives the above error.
Following is my code, don't pay attention to the messy layout because i've been testing some theories to get it to work.
function getemldata(){
$sock = new HTTPSocket;
$sock->connect("myhost.nl",2222);
$sock->set_method('GET');
$sock->set_login("admin","mykickasspassword");
$sock->query('/CMD_API_POP','domain=mytestdomain.nl&action=list');
$row = $sock->fetch_parsed_body();
print $row;
print_r($row);
print $row[0];
if(empty($row['list'])){
echo 'Lege domeinen lijst<br>';
echo "".$row['text'];
echo $row;
echo "".$row['details'];
if($row['error']= 1){
echo "error ding";
}
}else{
echo '<table><tr><th>Email adress</th></tr>';
for($i = 0;!empty($row['list'][$i]);$i++){
echo '<tr><td>'.$row['list'][$i].'</td></tr>';
}
echo '</table>';
}
The code always ends in the error if so prints it.
The print_r method gives me the error as i posted above (not owned domain).
I hope someone knows why the heck this wont work
Thanks in Advance,
Greetz,
Smiegt
I've been bugging myself for more than a week now trying to do a relative simple thing , (at least i tought it would be). I need to produce a list of all active e-mail adresses on my DA machine to hand over to the Dutch District of Justice daily.
I'm trying to do a user listing, then list domains per user then list e-mails per domain. That wouldn't work for me , so i tried it simpler which also didn't work.
I kept getting the following error :
Array ( [error] => 1 [text] => Could not excute your request [details] => You do not own that domain )
Thats a printout from the fetch_parsed_body() method which i use to capture the output.
I've tried to print a list of users trough the API which worked without problems, but when i try to print a list of e-mails per domain it always gives the above error.
Following is my code, don't pay attention to the messy layout because i've been testing some theories to get it to work.
function getemldata(){
$sock = new HTTPSocket;
$sock->connect("myhost.nl",2222);
$sock->set_method('GET');
$sock->set_login("admin","mykickasspassword");
$sock->query('/CMD_API_POP','domain=mytestdomain.nl&action=list');
$row = $sock->fetch_parsed_body();
print $row;
print_r($row);
print $row[0];
if(empty($row['list'])){
echo 'Lege domeinen lijst<br>';
echo "".$row['text'];
echo $row;
echo "".$row['details'];
if($row['error']= 1){
echo "error ding";
}
}else{
echo '<table><tr><th>Email adress</th></tr>';
for($i = 0;!empty($row['list'][$i]);$i++){
echo '<tr><td>'.$row['list'][$i].'</td></tr>';
}
echo '</table>';
}
The code always ends in the error if so prints it.
The print_r method gives me the error as i posted above (not owned domain).
I hope someone knows why the heck this wont work
Thanks in Advance,
Greetz,
Smiegt