Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    1

    Talking Customized Logins

    Just a suggestion for replacement for the customized login snippet located at:

    http://www.cpanel.net/cpanel-login.phps

    ----------------------------

    Code:
    <?php
    /*---User Edit Area---*/
    $CPLogin_UseSSL = true; // Use SSL to log in: true/false
    $CPLogin_Host = 'example.com'; // 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/";
    }
    ?>
    <html>
    <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">
    </form>
    </html>
    // 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?
    Last edited by CoderJedi; 12-29-2007 at 10:13 AM.

Similar Threads & Tags
Similar threads

  1. customized php.ini
    By hostnex in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-14-2010, 10:24 AM
  2. customized SMTP routing
    By mrcpu in forum E-mail Discussions
    Replies: 0
    Last Post: 02-22-2010, 07:35 PM
  3. Customized webmail problem
    By mark16 in forum E-mail Discussions
    Replies: 1
    Last Post: 01-31-2009, 02:24 PM
  4. How to keep customized settings??
    By BraveX in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-12-2006, 07:43 PM
  5. mail extractor customized?
    By bsasninja in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-23-2005, 07:26 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube