|
#1
|
|||
|
|||
|
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] |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
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. |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
http://forums.hostgator.com/showthread.php?t=10008
Only thing different to do is https://www.domainname.com:2083 for secure cpanel. Tom |
|
#8
|
|||
|
|||
|
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 |
|
#9
|
|||
|
|||
|
I see, the link was to the re-seller forum
Tom Quote:
Code:
|
|
#10
|
|||
|
|||
|
Tom, You are the man.
I was looking for this kind of script for the whole day. Thank You very much.
|
|
#11
|
|||
|
|||
|
Glad to help. Like I say, it's not my script, I think I found it at a previous host of mine
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
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.









