Cpanel api php email hesapı oluşturmak (Email Account created cpanel )

cpanel de uzaktan erişim ile whm nizi kullanmadan cpanel api vasıtası ile alan adınızda email hesapı olşturmak

indirmek için [dm]109[/dm]

<?php 

/*
Yi Xu  08/17/2010  Ver 1.0
This is a simple script for creating cpanel email accounts using cPanel XML API Client Class
I got the idea from http://www.zubrag.com/scripts/ cpanel email creator script.
However, their script uses fopen access cpanel directly and it doesn't work anymore.
Cpanel updated their version. It is better to use their client class to access cpanel functions externally.
Got any suggestions. please email me at andy3dfx@yahoo.com
*/
include("./xmlapi.php");   //XMLAPI cpanel client class

// Default whm/cpanel account info

$ip = "";           // should be WHM ip address
$account = "kullancı adı";        // cpanel user account name
$passwd ="şifre";        // cpanel user password
$port =2083;                 // cpanel secure authentication port unsecure port# 2082

$email_domain = 'domain.com'; // email domain (usually same as cPanel domain)
$email_quota = 50; // default amount of space in megabytes

/*************End of Setting***********************/

function getVar($name, $def = '') {
if (isset($_REQUEST[$name]))
return $_REQUEST[$name];
else
return $def;
}
// check if overrides passed
$email_user = getVar('user', '');
$email_pass = getVar('pass', $passwd);
$email_vpass = getVar('vpass', $vpasswd);
$email_domain = getVar('domain', $email_domain);
$email_quota = getVar('quota', $email_quota);

$msg = '';
if (!empty($email_user))
while(true) {

if ($email_pass !== $email_vpass){       //check password
$msg = "şifrleer uymuyr ";
break;
}

$xmlapi = new xmlapi($ip);

$xmlapi->set_port($port);  //set port number. cpanel client class allow you to access WHM as well using WHM port.

$xmlapi->password_auth($account, $passwd);   // authorization with password. not as secure as hash.

// cpanel email addpop function Parameters
$call = array(domain=>$email_domain, email=>$email_user, password=>$email_pass, quota=>$email_quota);

$xmlapi->set_debug(0);      //output to error file  set to 1 to see error_log.

$result = $xmlapi->api2_query($account, "Email", "addpop", $call ); // making call to cpanel api

if ($result->data->result == 1){
$msg = $email_user.'@'.$email_domain.' hesap oluşturuldu';

} else {
$msg = $result->data->reason;
break;
}

break;
}

?>

cPanel email hesapı aç

<?php echo '
'.$msg.''; ?>

cPanel Email


kullncıı adı:
şifre:
tekrar:

Scroll to Top