Web Hosting Talk







View Full Version : cpanel login script?


1Host
06-21-2004, 03:05 PM
I'm looking for a script that will allow my customers to login to cpanel from the homepage of our website. This would have to cover multiple servers. Does this beast exist?

3spades
06-21-2004, 03:44 PM
Go to yourdomain/cpanel and click cancel, it brings up an html form, get the source, grab the form and adjust the url to include yourdomain.com:2082/login/ or whatever the form action calls for.

VolkNet
06-22-2004, 03:13 AM
off subject: i really like the layout of your site hostmeister

Bashar
06-22-2004, 04:22 AM
<form action="https://<?echo $_SERVER['SERVER_NAME'];?>:2083/login/" method="post">
<b>Username:</b>
<input type="text" name="user">
<b>Password:</b>
<input type="password" name="pass">
<input type="submit" value="Login">
</form>



u can change it to http and port 2082 if u dont like https :)

chirpy
06-23-2004, 01:29 PM
cPanel have even posted an example page that basically does exactly what Bashar posted:
http://www.cpanel.net/cpanel-login.phps

1Host
06-23-2004, 01:37 PM
The trick is to have it work for multiple servers.

Bashar
06-23-2004, 09:26 PM
just add 3rd <input to request the domain.com so it can replace the $_SERVER['HTTP_HOST'] so whenever the customer puts his domain it will go to his server.

Strike Hosting
06-24-2004, 02:29 AM
I just threw this together... I hope it helps!

The only reason for the onchange beginning with 'ht'+'tp:// is because I cannot post links yet, and I guess vBullein considers the http prefix a link. You can change it if you want, it will work either way.

<form name="form" id="form" action="first_server_ip" method="GET">

Server:
<select name="server" onchange="form.action='ht'+'tp://'+this.value+':2082/';">
<option value="server_ip1">Server Name 1</option>
<option value="server_ip2">Server Name 2</option>
<option value="server_ip3">Server Name 3</option>
</select>
<br>
User: <input type="text" name="user">
<br>
Pass: <input type="text" name="pass">
<br>
<input type="submit" name="submit" value="submit">

</form>

Bashar
06-25-2004, 01:31 PM
you cant post links if you have less than 5 posts, try fixing it now ;)