hi all,
is it possible to login the CPanel from a webpage?
e.g. with a checkbox for userID an PW ?
thanks
hi all,
is it possible to login the CPanel from a webpage?
e.g. with a checkbox for userID an PW ?
thanks
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
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&
{
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&
{
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"
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
That code is really messed up with all the & replacing " and < or >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.
Is there a way you could please rewrite it using the php tag in the forum?
thank you very much.
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.
Maybe MrHits will see this and repost the code.
The board changeover did make some messes.
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.
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