Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Jul 2002
    Posts
    303

    Default Login CPanel from a Web Page?

    hi all,
    is it possible to login the CPanel from a webpage?
    e.g. with a checkbox for userID an PW ?


    thanks

  2. #2
    itf
    itf is offline
    Member
    Join Date
    May 2002
    Posts
    626

    Default

    you can use this method:

    http:// user : password @ domain.com:2082

    (use it without space characters)
    Please use messengers to contact me:
    MSN: patrickay@msn.com
    AIM: PatrickITF

  3. #3
    Member
    Join Date
    Oct 2001
    Posts
    93

    Default script to log in from page

    This asks the user for the domain name of their site. however, it is easily modified (2 minute mod) to ask for their user/pass, then push the user to their domain with user/pass embedded.


    (change references of gotwebhosting.com to whatever your domain is) and link to your whois script. Or just delete that function all together.

    There are a few links you should change, I put some notes in the html below, and some help for the customers that are not able to log in. IE, if the domain is not yet pointed, I tell them that they need to see &transfer.php& for instructions on transfering the domain.

    In all..its a handy script, if you know any html, you will be able to easily incoporate this to your site.

    -------------------
    two parts to this script login.html and customer-push.php



    contents of login login.html

    &!-- (c) ticket@web-hosting-support.com --&

    &form name=&submit& action=&customer-push.php& method=&get&&&
    www.
    &input type=&text& name=&domain&&&br&
    &font size=&-1&&Secure Control Panel
    &input type=&radio& value=&Y& name=&secure&&
    &BR&
    Non Secure (faster)
    &input type=&radio& value=&N& name=&secure& checked&
    &/font&&BR&
    &input type=&submit& value=&Submit&&
    &/form&


    Now for contents of customer-push.php




    &?

    ////////////////////////////////////////////////
    //Jeremy - May 19, 2002
    //Function to push user to their control panel
    //ticket@web-hosting-support.com
    //made for gotwebhosting.com
    //custom support solutions for cpanel servers
    ////////////////////////////////////////////////

    //check the domain the user typed in
    $phpnet = fsockopen(&$domain&, 2082, &$errno, &$errstr, 30);

    //the domain failed
    if(!$phpnet)
    {
    //give them reasons why they can not access the page
    ?&

    &p&&br&&p&&CENTER& &h2&UNABLE TO LOG IN!&/h2&&/p&&/center&
    &B&POSSIBLE&/B& reasons why you were unable to login:
    &P& 1) You might have mis-typed your domain name (the format must be domainname.ext,
    where .ext is .com, .net, .org, etc.). Please try again:&br&
    &form name=&submit& action=&customer-push.php& method=&get&&&
    www.
    &input type=&text& name=&domain&&&br&
    &font size=&-1&&Secure Control Panel
    &input type=&radio& value=&Y& name=&secure&&
    &BR&
    Non Secure (faster)
    &input type=&radio& value=&N& name=&secure& checked&
    &/font&&BR&
    &input type=&submit& value=&Submit&&
    &/form&


    2) Your domain may not yet be pointed to our nameservers:&br&
        A) Click here for instruction on how to &a href=&/transfer.php&&transfer&/a& your domain to our servers.&br&
        B) Click here to do a &a href=&http://www.gotwebhosting.com/whois.cgi?whois=$domain&&whois&/a& to see if your domain is pointed to us.
    &br&&br&&br&
    If this information did not help you, and you are in need of assistance, please contact &a href=&http://web-hosting-support.com/helpdesk/pdesk.cgi& target=&_blank&&tech support&/a&.

    &?php



    // GREAT! I'm able to acess the site using the admin port, lets
    //send the user over to the control panel
    else
    {
    // first, check to see if the user wanted a non secure panel
    if ($secure==&N&amp
    {
    header(&Location: http://$domain:2082&
    }

    //I guess not, send him to the secure panel.
    //(he/she was warned it will be slow)
    if ($secure==&Y&amp
    {
    header(&Location: https://$domain:2083&
    }
    }

    ?&
    Q: "I heard if you play the NT-CD backwards, you get a satanic message."
    A: "That's nothing, if you play it forward, it installs NT"

  4. #4
    Member
    Join Date
    Jul 2002
    Posts
    303

    Default

    thanks to all.



    &MrHits &
    i tryed your script but becomes the following error when i try to access an account:


    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mydirectory/public_html/testerlogin/customer-push.php on line 2

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mydirectory/public_html/testerlogin/customer-push.php on line 2

    Parse error: parse error in /home/mydirectory/public_html/testerlogin/customer-push.php on line 2

  5. #5
    Member
    Join Date
    Sep 2002
    Posts
    9

    Default Re: script to log in from page

    Originally posted by MrHits
    [B]This asks the user for the domain name of their site. however, it is easily modified (2 minute mod) to ask for their user/pass, then push the user to their domain with user/pass embedded.
    That code is really messed up with all the & replacing " and < or >
    Is there a way you could please rewrite it using the php tag in the forum?

    thank you very much.

  6. #6
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    The switchover to the new message board system caused that mess. All < > and " in old messages were changed to &.

    You'll have to just copy the code and change to the brackets or quotes depending on which is needed. If you know html and php code, it's fairly easy to know what's what.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  7. #7
    Member
    Join Date
    Sep 2002
    Posts
    9

    Default

    I thought it was too until I kept getting parsing errors....

  8. #8
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    Maybe MrHits will see this and repost the code.

    The board changeover did make some messes.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  9. #9
    cPanel Partner NOC cPanel Partner NOC Badge jackal's Avatar
    Join Date
    Feb 2002
    Posts
    708

    Default

    All they need to do on the board is turn html code on in the forum and it will work ok. Look bottom of this page left side you will see html code for this forum is turned off.

  10. #10
    Member
    Join Date
    May 2002
    Posts
    292

    Default

    Email me and I will send you a java script code that works. But let me warn you it means you are sending the user name and password over an open connection and if you are doing it between servers you are really opening yourself up for a hack.

    We have only been hacked once and it was when we had the script for log in from our website. A few web sites got defaced, so use it at your own discretion.

    The script kiddies and defacers are out there.

    monte+techark.com

Similar Threads & Tags
Similar threads

  1. How to create webmail login web page?
    By fredcwk in forum Themes and Branding
    Replies: 8
    Last Post: 03-14-2011, 08:40 AM
  2. Replies: 1
    Last Post: 02-11-2011, 10:14 AM
  3. how to change root login user to other for Cpanel WHM login page?
    By onnetsupport in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-07-2006, 09:21 AM
  4. Can i change cpanel/web login page
    By yukonn in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-27-2006, 02:42 AM
  5. Web mail login page
    By Radio_Head in forum Themes and Branding
    Replies: 3
    Last Post: 12-15-2002, 09:42 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube