Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Customized Logins

Discussion in 'cPanel Developers' started by CoderJedi, Dec 29, 2007.

  1. CoderJedi

    CoderJedi Registered

    Dec 29, 2007
    Likes Received:
    Trophy Points:
    Just a suggestion for replacement for the customized login snippet located at:


    /*---User Edit Area---*/
    $CPLogin_UseSSL = true; // Use SSL to log in: true/false
    $CPLogin_Host = ''; // Your server's hostname
    $CPLogin_Service = "whm"; // cpanel/whm/webmail
    /*---Do Not Edit Below---*/
    $CPLogin_FailURL = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1";
    if ($CPLogin_UseSSL) {
            $CPLogin_Port = array('cpanel'=>2083,'whm'=>2087,'webmail'=>2096);
            $CPLogin_URL = "https://" . $CPLogin_Host . ":" . $CPLogin_Port[$CPLogin_Service] . "/login/";
    } else {
            $CPLogin_Port = array('cpanel'=>2082,'whm'=>2086,'webmail'=>2095);
            $CPLogin_URL = "http://" . $CPLogin_Host . ":" . $CPLogin_Port[$CPLogin_Service] . "/login/";
    <h1>[Your Name Here]</h1>
    <b>cPanel Services Login</b><br>
    <?php if ($_GET['failed']) { ?>
    <font color=#FF0000>Your login attempt failed!</font>
    <?php } ?>
    <form action="<?php echo $CPLogin_URL; ?>"  method="post">
    User: <input type="text" name="user"><br>
    Pass: <input type="password" name="pass"><br>
    <input type="hidden" name="failurl" value="<?php echo $CPLogin_FailURL; ?>" />
    <input type="hidden" name="login_theme" value="default">
    <input type="submit" value="Login">
    // I love long nights filled with long lines of code just as much (if not more) than the next guy.. but hey, why not trim the fat when you can, right?
    #1 CoderJedi, Dec 29, 2007
    Last edited: Dec 29, 2007

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice