I have a script that allows clients to login to their cpanel or webmail from my website but it doesn't allow you to create an email account.
HTML Code:
<form action="cplogin.php" method="post" target="_blank">
<input type="hidden" value="2096" name="port" />
<table width="60%" align="center" cellpadding="0" cellspacing="4" >
<tr>
<td >Username:</td>
<td align="left"><input name="user" type="text" class="form_field" onfocus="clearDefaultandCSS(this)" value="full e-mail address" size="35" maxlength="50" /></td>
</tr>
<tr>
<td >Password:</td>
<td align="left"><input name="pass" type="password" class="form_field" size="35" maxlength="12" /></td>
</tr>
<tr>
<td align="right" colspan="2"><div align="center">
<input type="submit" name="login" value="login" style="cursor:pointer" />
</div></td>
</tr>
</table>
<br />
For webmail, please use your <span style="font-weight: bold">full email address</span> (yourname@yourdomain.com) as your username.
</form>
clientlogin.php (php and html):
PHP Code:
<?php
#your domain or ip
$domain = "missy.gendns9.com";
if(!$_POST['login']) {
exit;
}
$user = $_POST['user'];
$pass = $_POST['pass'];
$port = $_POST['port'];
$port == "2083" || $port == "2096" ? $pre = "https://" : $pre = "http://";
?>
HTML Code:
<body onLoad="setTimeout('document.forms[0].submit();',10)">
<form action="<?php echo "".$pre."".$domain.":".$port."/login/"; ?>" method="post">
<input type="hidden" name="user" value="<?php echo $user; ?>">
<input type="hidden" name="pass" value="<?php echo $pass; ?>">
</form>
I found it on the web somewhere awhile ago.