Sign in to follow this  
weBrazuca

Script Do Cpanel

Recommended Posts

Uma coisa que pode fazer seria criar um .html com o usuario, senha, e uns botoes de radio para escolherem se querem acessar o Cpanel, ou WHM, se em modo seguro ou normal e enviar com o action POST para o .php, digamos : logincp.php

voce pode adicionar uns controles de erros.. tem algumas informações no forum do cpanel,veja se ajuda

ficaria: +- assim,

logincp.php

<?
$dominio = "00.00.00.00"; //IP do servidor


if ($_POST['usuario'] && $_POST['senha'])
{
    switch ($_POST['login_option'])
    {
        case "2082":    $port = "2082";
                $protocolo = "http://";
                break;
        case "2083":    $port = "2083";
                $protocolo = "https://";
                break;
        case "2086":    $port = "2086";
                $protocolo = "http://";
                break;
        case "2087":    $port = "2087";
                $protocolo = "https://";
                break;
        default:
                $protocolo = "http://";
    }
            
    $redirectlocation = $protocolo.$dominio.":".$port."/login/?user=".$_POST['username']."&pass=".$_POST['pass']."&failurl=".$_POST['failurl'];
     header ("Location: ".$redirectlocation);


?>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this