Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 06-09-2004, 03:16 AM
Shane Shane is offline
Hatchling Croc
 
Join Date: May 2004
Posts: 14
Default

Hi there guys I downloaded a script so that my clents can just log onto cPanel

What can you see whats wrong with this?
This is my cpanel.php and when I try to login in it keeps giving me a blank screen.

[code:1:436a05494f]
<html>
<?php

#your domain or ip
$domain = "homehosting.biz";

if(!$_POST['login']) {
exit;
}

$user = $_POST['user'];
$pass = $_POST['pass'];
$port = $_POST['port'];

$port == "2082" || $port == "2096" ? $pre = "https://" : $pre = "http://";
$port == "2095" || $port == "2096" && !eregi("@", $user) ? $user = "".$user."@".$domain."&qu ot; : $user = $user;

?>
<body onLoad="setTimeout('document.forms[0].submit( );',10)">
<form action="<?php echo "".$pre."".$domain.":&quo t;.$port."/login/"; ?>" method="post">
<input type="hidden" name="user" value="<?php echo $user; ?>">
<input type="hidden" name="pass" value="<?php echo $pass; ?>">
</form>
</body>
</html>

[/code:1:436a05494f]
Reply With Quote
  #2  
Old 06-09-2004, 06:27 AM
Stef's Avatar
Stef Stef is offline
Royal Croc
 
Join Date: May 2004
Posts: 715
Default

Hi Shane,

in the start of your code you put:
[code:1:90d194440b]
if(!$_POST['login']) {
exit;
}
[/code:1:90d194440b]

If you go to your page the first time, !$_POST['login'] will be true, because you didn't have the chance to login yet. And the code says to exit if true, so the rest of the page is discarded.

Stef.
Reply With Quote
  #3  
Old 06-09-2004, 07:15 AM
Shane Shane is offline
Hatchling Croc
 
Join Date: May 2004
Posts: 14
Default

hmm...
So if I delete that part, then it should work?

I'll try it, first commenting it out and I'll see if it works.

Thanks
Shane
Reply With Quote
  #4  
Old 06-09-2004, 08:02 AM
Shane Shane is offline
Hatchling Croc
 
Join Date: May 2004
Posts: 14
Default

taking that out takes me to http://homehosting.biz:/login/ which not only doesnt exist but not where I want it.

Any ideas?

Thanks
Shane
Reply With Quote
  #5  
Old 06-09-2004, 10:21 AM
Stef's Avatar
Stef Stef is offline
Royal Croc
 
Join Date: May 2004
Posts: 715
Default

Shane,

I didn't look a the script very well previously.

You should call this script from another page, where you have a form that asks for the values 'user', 'pass' and 'port'. When you (your client) submits that form, the value $_POST(['login']) will be true and the rest of the script will be executed and the values substituted with the ones that were filled out in the form.
Where you downloaded this script you should find an example of the form that should be calling this script, I suppose.

Maybe this script here can also help you out:
http://forum.hostgator.com/viewtopic...l+login+script

Bye,
Stef.
Reply With Quote
  #6  
Old 11-01-2006, 08:32 PM
Unregistered
HostGator Guest
 
Posts: n/a
Default Re: Login Script for cPanel

Hi.
Is there way only to have the Cpanel and so that there would be no choise for other stuff (mail, whm)
Only two fealds i want "login" and "password"

Thanks
Reply With Quote
  #7  
Old 11-01-2006, 09:04 PM
tomowa tomowa is offline
Junior Croc
 
Join Date: Aug 2005
Location: Odessa, Wa
Posts: 135
Default Re: Login Script for cPanel

http://forums.hostgator.com/showthread.php?t=10008

Only thing different to do is https://www.domainname.com:2083 for secure cpanel.

Tom
Reply With Quote
  #8  
Old 11-01-2006, 09:48 PM
zonehost zonehost is offline
Hatchling Croc
 
Join Date: Nov 2006
Posts: 2
Default Re: Login Script for cPanel

I could not go to the link you gave me. No permission for some reason..

Where do I write https://www.domainname.com:2083
Or what did you mean. Can you please show where in the script to put this?

Thanks
Reply With Quote
  #9  
Old 11-01-2006, 10:38 PM
tomowa tomowa is offline
Junior Croc
 
Join Date: Aug 2005
Location: Odessa, Wa
Posts: 135
Default Re: Login Script for cPanel

I see, the link was to the re-seller forum

Tom

Quote:
Here is the exact form I use to do this. I didn't write it, I found it somewhere on the net.......Well heck, this is what it looks like www.tomowa.net.

Code:
 
 
<b>Already a customer? Access your cpanel login here:</b> <br><form action="http://www.reseller domain name.com:2082/login/" method=POST>User: <input type=text name=user> <br>Pass: <input type=password name=pass><input type=hidden name=failurl value="<A href="http://www.reseller%20domain% 20name.com/index.php?failed=1"><input">http://www.reseller domain name.com/index.php?failed=1"><input type=submit value=Login></form>
Reply With Quote
  #10  
Old 11-01-2006, 11:04 PM
zonehost zonehost is offline
Hatchling Croc
 
Join Date: Nov 2006
Posts: 2
Default Re: Login Script for cPanel

Tom, You are the man.
I was looking for this kind of script for the whole day.

Thank You very much.
Reply With Quote
  #11  
Old 11-02-2006, 02:31 PM
tomowa tomowa is offline
Junior Croc
 
Join Date: Aug 2005
Location: Odessa, Wa
Posts: 135
Default Re: Login Script for cPanel

Glad to help. Like I say, it's not my script, I think I found it at a previous host of mine
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone want a login form to check webmail for there website? mediahosting Webhosting 9 11-17-2004 06:47 AM
[Closed] index.html page for my clients to login london Shared Hosting Support 8 05-19-2004 10:27 PM
[Closed] script problems amartins Shared Hosting Support 4 05-05-2004 07:19 AM
Perl Script to Notify Cellphone of Email? dmacke Pre-Sales Questions 0 10-02-2003 04:09 PM

All times are GMT -5. The time now is 12:23 PM.