I'm trying to create an email into DirectAdmin by API but my codes give back a syntax error on line 10 but i don't see anything wrong with that line.
<?php
include('../da_api');
$sock = new HTTPSocket;
$sock->connect('mijndomein',2222);
$sock->set_login('mijndomein','mijn 1337 ww');
if(!empty($_POST['user']) && !empty($_POST['passwd']) is_numeric($_POST['quota'])) {
$sock->query('/CMD_API_POP','domain=mijndomein"a='.$_POST['quota'].'&action=create&user='.$_POST['user'].'&passwd='.$_POST['passwd'].'');
echo $sock->result;
if(eregi('error=0', $sock->result)){
echo '<p>Email adress is aan gemaakt<br />
username: '.$_POST['user'].'@mijndomein.nl<br />
password: '.$_POST['passwd'].'<br />
Quota: '.$_POST['quota'].'<br />
POP3 server: mail.mijndoemin.nl<br />
SMTP server: mail.mijndomein.nl*</p>';
}
}
?>