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.

How can I get people i host to log into their cpanel from my site.

Discussion in 'General Discussion' started by Hughra Hosting, Jan 31, 2004.

  1. Hughra Hosting

    Joined:
    Jan 12, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I don't know how to do it. Ive seen other sites with this being done. Can somone please help me.
     
  2. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
  3. Hughra Hosting

    Joined:
    Jan 12, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    GIve who mah ip

    cpanel?
     
  4. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    cplogin.php:
    Code:
    <?php
    if (isset($_POST['domain'])) {
        $dom = trim($_POST['domain']);
        $lbl = "[-a-z0-9.]+";
        if (preg_match("/^($lbl\.)+$lbl\$/i", $dom)) {
            header("Location: https://$dom:2083\n\n");
            exit;
        } else {
            echo("<p>Wrong domain</p>");
        }
    }
    ?>
    <form action="cplogin.php" method="post">
    Domain: <input type="text" name="domain" value="">
    <input type="submit" value="Login">
    </form>
    Including the username and password in the URL is best avoided.
     
  5. drunkn_munky

    drunkn_munky Member

    Joined:
    Jan 31, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    How do i make it so they put in their username and password aswell ???
     
Loading...

Share This Page