I'm using the following code to create an email account and a email forward at the same time. I'm consfused as the email forward works every time (f2) and the email creation is only working roughly half the time (f1). I'm a PHP newbie and can't understand what could cause this. Any help is appreciated!
$f = fopen ("https://$cpuser:$cppass@$cpdomain:2083/frontend/$cpskin/mail/doaddpop.html?email=$username&domain=$cpdomain&password=$password"a=0", "r");
fclose($f);
$f2 = fopen ("https://$cpuser:$cppass@$cpdomain:2083/frontend/$cpskin/mail/doaddfwd.html?email=all&domain=$cpdomain&fwdemail=$email&fwdopt=fwd&submit=Add Forwarder", "r");
fclose($f2);
file_get_contents()
instead offopen()
/fclose()
and you can echo out the contents to the screen to see if cpanel is sending you an error – Attlee