if($_POST["email"]){ $email = $_POST["email"] ;
$explode = explode("@", $email) ;
$dominio = $explode[1];
$emaild = $explode[0];
}
$cota ="5"; //Cota do email
$url="http://www.$dominio:2082/frontend/x2/mail/dopasswdpop.html";
?>
if($vai=="modifique"){
?>
Modificando senha de email no Cpanel
|
Toque a senha de seu email
|
|
|
|
|
|
|
|
} if($vai=="dados"){?>
} ?>
function login_cpanel ($username, $password) {
$cpanel_file_location = "/frontend/x2/mail/";
$cpanel_domain = "nardoimoveis.com.br"; //Dominio
$cpanel_port = 2082;
$header = "POST " . $cpanel_file_location . " HTTP/1.0\r\nAuthorization: Basic ";
$header .= base64_encode($username . ":" . $password) . "\r\n";
$header .= "Content-type: application/x-www-form-urlencoded\r\n";
$header .= "Content-length: " . strlen($request) . "\r\n";
$header .= "Connection: close\r\n\r\n";
$fp = fsockopen($cpanel_domain, $cpanel_port, $errno, $errstr);
if ($fp) {
fputs($fp, $header);
while (!feof($fp)) { $cpanel_response .= fgets($fp, 128); }
}
if ((strpos($cpanel_response, "200 OK") < 1) && (strpos($cpanel_response, "WWW-Authenticate") > 0)) {
return false;
} else {
return true;
}
$fp = fclose($fp);
}
if ((strlen($_POST["username"]) > 0) && (strlen($_POST["password"]) > 0)) {
if (login_cpanel ($_POST["username"], $_POST["password"]) == true) {
echo "Aguarde...";
$oculta = 1;
} else {
echo "Usuario ou senha incorretos.";
}
}
if ($oculta != 1)if($vai=='') {
?>
} ?>