i am trying to built an php page where users can click on button and login to cPanel as many of websites already have this feature.
i am searching for code on Internet from last 1 week and found one code mostly uses is
using hidden variable with form and submit the form.
this works perfect but my concern is that these hidden fields can be viewed by source code or firebug.
is there any other way to login to cPanel without having user name & passwords in page or at least not viewable to user.
i am searching for code on Internet from last 1 week and found one code mostly uses is
using hidden variable with form and submit the form.
PHP:
<?php
$domain ='dname';
$user ='duser';
$pass = 'dpass';
$port = '2083';
$port == "2083" || $port == "2096" ? $pre = "https://" : $pre = "http://";
$action = $pre."".$domain.":".$port."/login/";
?>
<body onLoad="setTimeout('document.forms[0].submit();',10)">
<form action="<?php echo $action;?>" method="post">
<input type="hidden" name="user" value="<?php echo $user; ?>">
<input type="hidden" name="pass" value="<?php echo $pass; ?>">
</form>
</body>
</html>
is there any other way to login to cPanel without having user name & passwords in page or at least not viewable to user.