2013-06-13 4 views
0

다음 코드를 사용하여 이메일 계정과 이메일을 동시에 생성합니다. 전자 메일 전달은 매번 (f2) 작동하고 전자 메일 작성은 대략 절반 만 (f1) 작업하므로 혼란 스럽습니다. 나는 PHP 초심자이고 이것을 일으킬 수있는 것을 이해할 수 없다. 어떤 도움을 주셔서 감사합니다!fopen으로 cPanel 이메일 계정 만들기

$f = fopen ("https://$cpuser:[email protected]$cpdomain:2083/frontend/$cpskin/mail/doaddpop.html?email=$username&domain=$cpdomain&password=$password&quota=0", "r"); 
     fclose($f); 
    $f2 = fopen ("https://$cpuser:[email protected]$cpdomain:2083/frontend/$cpskin/mail/doaddfwd.html?email=all&domain=$cpdomain&fwdemail=$email&fwdopt=fwd&submit=Add Forwarder", "r"); 
     fclose($f2); 
+0

사용해보십시오 'fopen()'/'fclose()'대신'file_get_contents()'를 사용하면 내용을 화면에 출력하여 cpanel이 오류 – chrislondon

+0

당신은 새로운 야후 메일도 싫어하니? – John

답변

2

야후! 폐쇄 중이므로 자신의 이메일을 구현해야합니다. 나는 현재 JustHost를 사용하고있다. 변수를 이해하기 쉽도록하기 위해 노력했습니다. 그들이 당신이 필요로하는 것을 이해할 것이기 때문에 당신이 그들이 무엇을 의미하는지 이해하지 못한다면 당신의 주인에게 먼저 연락하십시오 (당신이 유능한 기술을 습득했다고 가정하기 때문에).

<?php 
//exampledot.com for domain 

$cpuser = 'exampled';////////////e.g. exampled, your cPanel main domain usually 
$cppass = 'CPANEL-PASSWORD';/////Your cPanel password. 
$cpdomain = 'exampledot.com';////The cPanel domain 
$cpskin = 'justhost';////////////listed on cPanel as 'theme' 
$emailname = 'john1';/////////////The username, e.g. [email protected] 
$emaildomain = 'exampledot.com';////The domain name in email, @exampledot.com 
$emailpass = 'EMAIL_PASSWORD';////The password for the email account 
$quota = '25';///////////////////Megabytes of space, 0 for unlimited 


$homepage = file_get_contents("https://$cpuser:[email protected]$cpdomain:2083/frontend/$cpskin/mail/doaddpop.html?email=$emailname&domain=$emaildomain&password=$emailpass&quota=$quota"); 
echo $homepage; 
?> 

나는 그 코드 만 사용하고 cPanel을 확인한 후 전자 메일 계정을 만들었습니다.

URL이 제대로 작동하므로 file_get_contents 기능을 사용하고 싶습니다. 전체 플러그인에 대한 fopen을

$fopen ("http://$cp_user:[email protected]$cp_domain:2082/frontend/$cp_skin/mail/doaddpop.html?email=$user&domain=$e_domain&password=$e_pass"a=$e_quota", "r"); 

+0

일하는 것 같습니다. 고마워요! –