| Reseller Hosting Questions about your reseller hosting account. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,542 posts
Gave thanks: 91
Thanked 49 times
|
How to: cPanel Form on Website.
*Although this can work for anyone, even those not reselling, this is a cool extra for Reseller's websites to help their customers*
Here is alittle tutorial on how to setup a cPanel login form on your website! NOTE: This code has the option for those logging in to make it is SSL connection or not. IF YOU DO NOT HAVE SSL ACCESS (https://) THEN PLEASE SEE STEP 3!! ---------------------------------------------------------------------------------------- Step 1: Form Code (basic) Code:
<form action="cpanel.php" method="post"> Username: <input type="text" name="user"><br> Password: <input type="password" name="pass"><br> <input name="secure" type="checkbox" value="1" checked /> Secure Login?<br> <input type="submit" name="submit" value="Login!"> </form> Step 2: Creating cPanel.php The following uses PHP commands to transfer the information from the form to generate a cPanel login. PHP Code:
Once you've made your edits, save/close. Step 3: What to Do if Your Account Doesn't have SSL? If your account doesn't support SSL (usually shared servers require a one time fee for SSL, dedicated servers get it for free), then you can (and is recommended) remove the following from the form HTML code: Code:
<br> <input name="secure" type="checkbox" value="1" checked /> Secure Login? PHP Code:
PHP Code:
![]() Step 4: Creating Other Service Logins You can create logins for cPanel, but why not include this type of love for WHM, Webmail, and Broswer FTP users? You can, and with just two simple changes! First, the most obvious change is the file name the HTML form uses. In fact, you can change itno matter what, just make sure it is the file name where the PHP coding to process the login is the same. So, for WHM logins, you can name it the basic, "WHM.php" (you can use uppercase or lowercase, of course) Now, in the script (PHP coding), you'll need ot change the port numbers! This is so it logs in to the right service, otherwise it'll just go for cPanel, that was used in this tutorial. The following are port numbers for each service, that replaces "website.com:2083" or "website.com:2082". Standard WHM - 2086 Secure WHM - 2087 Standard Webmail - 2095 Secure Webmail - 2096 Now, for secure FTP web-broswer login, (in the PHP coding of the script) just make the following changes that apply to your needs: + "https://" with "ftps://" + "http://" with "ftp://" + "website.com:20XX" with your url/domain (for both entries) Save and close! ---------------------------------------------------------------------------------------- I hope this helps all of you that need it! Feel free to post question/support needs here. ALSO, those familiar with this type of PHP scripting, you could make it (with very minor tweaks) make multible login processings with one .php file! Otherwise, to those whom do not know this coding as well, just use the examples ![]()
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Seasoned Poster
Joined in Apr 2006
36 posts
Gave thanks: 0
Thanked 0 times
|
That's a nifty little script! With a little tweaking you could make one form work for webmail, whm, and cPanel. I might use that. Thanks!
Clinton
__________________
Clintonweaver.com Server Name: Pass58 |
|
|
|
|
|
#4 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,542 posts
Gave thanks: 91
Thanked 49 times
|
No problem Clinton564, hope it helps!
![]() What do you mean? If you mean just send the values to domain.com:2082 or so, no it won't work. The layout needs to be there... as I've tried it at first until this.
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#5 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,542 posts
Gave thanks: 91
Thanked 49 times
|
Incase this has been forgotten, BUMP. I miss my dedicated server...
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#6 (permalink) |
|
Registered User
Excelling Contributor
Joined in Feb 2005
521 posts
Gave thanks: 79
Thanked 24 times
|
Very nice! I was looking for something like that, thank you.
![]() What I actually want is a multiple server login form. I have 4 different servers, so I'd need to have a way for the client to select the server and then login. Is it possible. Does anyone know how to do it?
__________________
Patty Pass 57 |
|
|
|
|
|
#7 (permalink) | |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,542 posts
Gave thanks: 91
Thanked 49 times
|
Quote:
Add the following to the form: Code:
<select name="host">
<option value="00.0.000.000">Server 1</option>
<option value="00.0.000.000">Server 2</option>
<option value="00.0.000.000">Server 3</option>
<option value="00.0.000.000">Server 4</option>
</select>
PHP Code:
Just remember to replace the 00.0.000.000 with the correct ips or domain names (without the www. or the http://)
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
| This user thanks GamingHybrid for this great post! | Patty (February 21st, 2007) |
|
|
#9 (permalink) |
|
Registered User
Excelling Contributor
Joined in Feb 2005
521 posts
Gave thanks: 79
Thanked 24 times
|
GH, works like a charm! Thank you so much!!
Now just one final silly question: how can I make cPanel open up in a new window so the user doesn't have to leave my site? Tks a lot for this little gem and for you help.
__________________
Patty Pass 57 |
|
|
|