Right now I am trying to set-up a customized cPanel. I have one master cPanel account, and I am using databases to sort out which ftp and mysql goes to which account. For me this has been the easiest way.
Now here is where the trouble is. I have been able to script creating the FTP accounts, MySQL, and everything else fine. The only problem is I can run the scripts after I enter in the master username and password (when it pops up on my page). Now I couldn't possibly give the log-in informations to my customers because then they could just log right into cPanel and have control over everything!
So I need to automatically log into cPanel in the background, so the user isn't even prompted for a username and password, and I'll let my databases do the rest of the sorting out.
Right now I have this script (which is a modified version of a manual log-in script I found on this forum):
Now when I run the script, it automatically logs me in, and brings me to the main cPanel page. However I do not want to be redirected there because I do not want my customers to have access to all of the accounts, or to even access cPanel at all. So I tried using it in an inline frame, and that didn't work (I don't know why), and if I load it from a popup, I have no way to close it, so the user can still use it.
So I would like to know if there is another alternative, or if there is another way to manipulate this code to allow me to automatically log-in without my users even knowing.
Thank-you! :D
Now here is where the trouble is. I have been able to script creating the FTP accounts, MySQL, and everything else fine. The only problem is I can run the scripts after I enter in the master username and password (when it pops up on my page). Now I couldn't possibly give the log-in informations to my customers because then they could just log right into cPanel and have control over everything!
So I need to automatically log into cPanel in the background, so the user isn't even prompted for a username and password, and I'll let my databases do the rest of the sorting out.
Right now I have this script (which is a modified version of a manual log-in script I found on this forum):
PHP:
<?php
$domain = 'domain.com';
$user = 'usernamel';
$pass = 'password';
$port = '2082';
$pre = 'http://';
?>
<body onLoad="setTimeout('document.forms[0].submit();',10);">
<form action="<?php echo $pre.$domain.':'.$port.'/login/'; ?>" method="post">
<p><input type="hidden" name="user" value="<?php echo $user; ?>" />
<input type="hidden" name="pass" value="<?php echo $pass; ?>" />
</p>
</form>
So I would like to know if there is another alternative, or if there is another way to manipulate this code to allow me to automatically log-in without my users even knowing.
Thank-you! :D
Last edited: