The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding cPanel login

Discussion in 'General Discussion' started by debz01, Jun 4, 2008.

  1. debz01

    debz01 Registered

    Joined:
    Jun 3, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    hi guys i am a new user to this forum and i am looking for a bit of advice on istalling a cPanel login on my website,
    i have installed a login with this script

    cplogin.php

    <html>
    <?php

    #your domain or ip
    $domain = "yourdomain.com";

    if(!$_POST['login']) {
    exit;
    }

    $user = $_POST['user'];
    $pass = $_POST['pass'];
    $port = $_POST['port'];

    $port == "2083" || $port == "2096" ? $pre = "https://" : $pre = "http://";
    ?>
    <body onLoad="setTimeout('document.forms[0].submit();',10)">
    <form action="<?php echo "".$pre."".$domain.":".$port."/login/"; ?>" method="post">
    <input type="hidden" name="user" value="<?php echo $user; ?>">
    <input type="hidden" name="pass" value="<?php echo $pass; ?>">
    </form>
    </body>
    </html>


    The form my your site

    <form action="cplogin.php" method="post">
    <table cellspacing="4" cellpadding="0">
    <tr><td>Username:</td><td><input type="text" name="user"></td></tr>
    <tr><td>Password:</td><td><input type="password" name="pass"></td></tr>
    <tr><td>Login To:</td>
    <td align="right">
    <select name="port">
    <option value="2082">cPanel</option>
    <option value="2083">Secure cPanel</option>
    <option value="2095">Webmail</option>
    <option value="2096">Secure Webmail</option>
    </select>
    </td></tr>
    <tr><td align="right" colspan="2">
    <input type="submit" name="login" value="login" style="cursor:pointer">
    </td>
    </tr>
    </table>
    </form>

    the problem is when i go to login it directs me to no where ? can anyone tell me what im missing? or where i have gone wrong
    my web is http://www.host-u.co.uk im currently in the process of building it
    kind regards
    Debbie
     
  2. Amit Deshmukh

    Amit Deshmukh Well-Known Member

    Joined:
    Jul 1, 2007
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    C:):)l

    Are you sure you have changed your domain name in cplogin.php file while testing. Your script seems to lovely.

    You can modify the below script
    = = = = = = = = = = = = = = = = = = = = = = = = = =
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Cpanel Login</title>
    <style type="text/css">
    <!--
    body,td,th {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #000000;
    }
    body {
    background-color: #FFFFFF;
    }
    a:link {
    color: #000000;
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    color: #000000;
    }
    a:hover {
    text-decoration: none;
    color: #000000;
    }
    a:active {
    text-decoration: none;
    color: #000000;
    }
    -->
    </style></head>
    <tr>
    <td><form action="http://www.yourdomain.com:2082/login/" method="post">
    Username:<input type="text" name="user"><br></div></td>
    </tr>
    <tr>
    <td>Password: <input type="password" name="pass"></div></td>
    </tr>
    <tr>
    <td><input type="Submit" value="Login" name="Login"></div></form></td>
    </tr>
    </table>
    <br>
    <em><strong><a
    href="http://YourDomain.com">http://Yourdomain.com</a></strong></em>
    <body>
    </div>
    </body>
    </html>
    = = = = = = = = = = = = = = = = = = = = = = = = = =
    NOTE: TO BE DONE AT YOUR OWN RISK
    = = = = = = = = = = = = = = = = = = = = = = = = = =

    Regards,
    Amit
     
    #2 Amit Deshmukh, Jun 4, 2008
    Last edited: Jun 4, 2008
Loading...

Share This Page