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.

Cpanel Log in

Discussion in 'General Discussion' started by blueflowers, Jul 4, 2005.

  1. blueflowers

    blueflowers Registered

    Joined:
    Jul 4, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I am not sure if this is the correct place for this post. I have done some research and searching on your site and have not found anything. I am not the best html/php developer. Just do this as a hobby and I am still learning. How would I make it so I can have a login for cpanel on the main page of a site? I have seen this on other sites and looked hard at there code, but I can not figure out how to do it. I have gotten this far, www.gardenhosting.com/testing.html. When you login from there, it says login is not on the server. What have I done wrong? Thank you very much for your time and help.
    Andrew
     
    #1 blueflowers, Jul 4, 2005
    Last edited: Jul 4, 2005
  2. lankyb

    lankyb Well-Known Member

    Joined:
    Sep 21, 2004
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Peterborough, UK
    You can actually find the code on the main cPanel website, under the documentation area... but here is what you were looking for.: http://www.cpanel.net/cpanel-login.phps

    Just to help you, i have re-coded the script to the design you have on your testing page. So hopefully you do not have to do much :)

    PHP:

    <?php
    #Login Configuration

    #cPanel
    $protocol 'http';
    $port 2082;

    #Secure cPanel
    #$protocol = 'https';
    #$port = 2083;

    #WHM
    #$protocol = 'http';
    #$port = 2086;

    #Secure WHM
    #$protocol = 'https';
    #$port = 2087;

    #Webmail
    #$protocol = 'http';
    #$port = 2095;

    #Secure Webmail
    #$protocol = 'https';
    #$port = 2096;
    ?>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
        <html>
            <head>
                <title>gardenhosting.com - Web Hosting</title>
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                <link href="http://www.gardenhosting.com/style/style.css" rel="stylesheet" type="text/css">
            </head>
            <body>
        
            <table width="60%" border="0" summary="" align="center" >
                <tr>
                    <td width="60%" >
                      <p align="center"><img src="http://www.gardenhosting.com/img/header2.jpg" align="left" width="850" height="300"></p>
                    </td>
                </tr>
                <tr>
        
                <?php
                    
    print "<form action=\"" $protocol "://" $_SERVER['HTTP_HOST'] . ":" $port "/login/\"
                    method=POST>"
    ;
                
    ?>
        
                    <td align='right' valign='right'><img src="http://gardenhosting.com/c/admin/themes/blue/images/space.gif" width='15' height='9'>
                        Enter Username:<input style="BORDER-STYLE: solid; BORDER-COLOR: #999999; BACKGROUND-COLOR: #ffffff; BORDER-WIDTH: 1px; FONT-FAMILY: Verdana; FONT-SIZE: 8pt" size='15' maxlength='50' type='text' name='user' value=''>
                    </td>
                </tr>
                    <tr>
                    <td align='right' valign='right'><img src="http://gardenhosting.com/c/admin/themes/blue/images/space.gif" width='15' height='9'><font color='#000000'>
                        Enter Password:</font><input style="BORDER-STYLE: solid; BORDER-COLOR: #999999; BACKGROUND-COLOR: #ffffff; BORDER-WIDTH: 1px; FONT-FAMILY: Verdana; FONT-SIZE: 8pt" size='15' maxlength='50' type='password' name='pass'>
                    </td>
                 </tr>

                <?php
                    
    print "<input type=hidden name=failurl value=\"http://" .  $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
                
    ?>

                <tr>
                    <td align='right' valign='middle'><input style="font-family:verdana, arial, helvetica; font-size: 8pt; border-style: solid; border-color: 999999; border-width: 1pxl; background-color: e7e7e7; font-weight: 800" type='submit' name='submit' value='Login Now &gt;&gt;'></td>
                </tr>
                <tr>
                    <td width="983" align="right">
                      <p align="center">
                      <?php
                        
    if ($_GET['failed'] == "1") {
                            print 
    "<font color=#FF0000>Your login attempt failed!</font>";
                        }
                    
    ?>
                    </td>
                </tr>
                <tr>
            </table></form>
    <tr> 
        <td colspan="2" valign="botom"><table width="60%" border="0" align="center" cellpadding="0" cellspacing="5">
            <tr> 
          <br>
    <br>
    <br>
    <br>

    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
              <td width="60%" align="center" valign="bottom"><a href="tos.htm">Terms 
                and conditions </a>| <a href="faq.htm">FAQ</a> | <a href="support.htm">Support</a></strong><br>
                Copyright 2005 GardenHosting.com All rights reserved.</td>

              <td width="2%" align="right" valign="top"></td>
            </tr>
            <tr> 
              <td align="left" valign="top">&nbsp;</td>
              <td align="right" valign="top">&nbsp;</td>
            </tr>
          </table></td>
      </tr>


    </body>
    <br>

    </html>

     
  3. blueflowers

    blueflowers Registered

    Joined:
    Jul 4, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Wow! That worked perfect. I can't thank you enough. I appreciate it very much, hopefully I can sometime return the favor.
     
  4. lankyb

    lankyb Well-Known Member

    Joined:
    Sep 21, 2004
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Peterborough, UK
    Happy to help :)
     
Loading...

Share This Page