Results 21 to 25 of 25
Thread: Cpanel login from website form
- 12-24-2004, 08:47 AM #21
WHC Guru
- Join Date
- Oct 2004
- Location
- http://kooshin.com
- Posts
- 4,201
Yeah I know but I didn't seem to know the values etc .
█ For Reliable and Affordable Web Hosting Packages, Please visit kooshin.com
█ KooshinDesigns.com- Version One Online
█ ArticleStorage.com- Your #1 Resource For Articles
█ 4Ulyrics.com -- The Lyrical Hideout, For Sale - Email me for details.
- 12-24-2004, 10:25 AM #22
WHC Guru
- Join Date
- Jan 2004
- Posts
- 3,363
well use a mix of whats already pasted and of your knowledge it isnt to hard...
- 12-24-2004, 10:36 AM #23
WHC Guru
- Join Date
- Oct 2004
- Location
- http://kooshin.com
- Posts
- 4,201
Yeah I know at the moment I don't need it but when I need it will use it
█ For Reliable and Affordable Web Hosting Packages, Please visit kooshin.com
█ KooshinDesigns.com- Version One Online
█ ArticleStorage.com- Your #1 Resource For Articles
█ 4Ulyrics.com -- The Lyrical Hideout, For Sale - Email me for details.
- 04-15-2006, 02:38 AM #24Pixel Inception Guest
I have a feature where clients can login to cpanel with a click of a button. Once they have logged in the clients area, they have a link to launch webmail and cpanel. Clients seem to find this useful instead of typing in their password at every checkpoint.
Roshan N.
http://pixelinception.comLast edited by Pixel Inception; 04-15-2006 at 02:49 AM.
- 12-18-2006, 08:57 AM #25Ministry Servers Guest
Heres mine, it includes a secure login for whm, cpanel x & web mail
Put this on the page you would like the login to appear on:
And for this, create a new php file called cpanelLogin.php :Code:<form action="cpanelLogin.php" method="POST"><?php// Show an error if the login failedif(($_GET['failed'] == "1") or ($error == 1)){echo '<font color="#FF0000">Your login attempt failed!</font><br />';}?>Domain: <input type="text" name="domain" value="" size="20" /><br />Username: <input type="text" name="username" value="" size="20" /><br />Password: <input type="password" name="pass" value="" size="20" /><br /><?php// This failurl allows cPanel to redirect back to this siteecho '<input type="hidden" name="failurl" value="http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?failed=1">';?>Options: <select name="port"> <option value="2082">cPanel </option> <option value="2083">Secure cPanel </option> <option value="2086">WHM</option> <option value="2087">Secure WHM</option> <option value="2095">Webmail</option> <option value="2096">Secure Webmail</option></select><br /><input type="submit" value="Login" /></form>
Code:<?php// make sure all needed information is providedif($_POST['domain'] && $_POST['username'] && $_POST['pass'] && !($_GET['failed'] == "1")) { $port = $_POST['port']; // sets the port number to login to // Get the protocol to use for this connection switch($port) { case '2082': // cPanel case '2086': // WHM case '2095': // Webmail $protocol = 'http://'; break; case '2083': // Secure cPanel case '2087': // Secure WHM case '2096': // Secure Webmail $protocol = 'https://'; break; } // Build the URL $redirectlocation = $protocol.$_POST['domain'].':'.$port.'/login/?user='.$_POST['username'].'&pass='.$_POST['pass'].'&failurl='.$_POST['failurl']; header ("Location: ".$redirectlocation); // Send URL} else { $error = 1; header ("Location: ".$_POST['failurl']); // Send URL if all neede information is not provided}?>



LinkBack URL
About LinkBacks




Reply With Quote






Bookmarks