|
Hey guys. I know the subject is fairly vague, but
there’s no “short” way to describe my problem/question. I am writing a script that will allow users to log-in to
their webmail account from our front page. So I have the form which
submits to another script so that the login username can be formatted
properly. That formatting script then posts variables to the
src/redirect.php script via cURL functions. When I run my script, I get the error that I have to be
logged-in in order to view that page. I have looked at the true SM login
form, and changed my variable names to those in the form fields (“login_username”
and “secretkey”). That did not work. So could someone
tell me where I’m going wrong? I’m including some scripts
below as well as other information: n IMAP/POP3
server n PHP 4.3 n Apache
Server n Linux OS n Installed by
uploading & configuring config.php n SquirrelMail
Latest build n No plugins n Error
Message: You have to be logged in to view this page. PHP email_login Script (Posts vars to redirect.php): <? $username = $_REQUEST['username']; $pass = $_REQUEST['password']; if($username != "domain_login"){ $user
= $username.'@domain.org'; } else{ $user
= $username; } $url = ""> $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://'.$url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,
"login_username=".$user."&secretkey=".$pass); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_exec($ch); curl_close($ch); ?> The $_REQUEST[‘’] gets the correct variables and
all works, but it just won’t log me in. Thanks for any help you can offer. ~Brett |
- Re: [SM-USERS] External Login Not Completing Login Brett Patterson
- Re: [SM-USERS] External Login Not Completing Login p dont think
