Ask a Question related to PERL Modules, Design and Development.
-
warhua@gmail.com #1
how can I login the web
my code,and i don't know how to get the value of "PHPSEEid"??
who can tell me how to do ?thank you very much!
=============
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
my
$url='http://192.168.110.129/security/login/login.php?selectedLanguage=eng';
$ua=LWP::UserAgent->new();
$req1= POST
$url,[userName=>'manager',userPwd=>'manager',PHPSEEID=>" $PHPSESSID"];
$content=$ua->request($req1)->as_string;
print $content;
=====================
but i received the message:
==================
HTTP/1.1 200 OK
Cache-Control: no-cache, must-revalidate
Connection: close
Date: Mon, 07 Aug 2006 08:02:36 GMT
Pragma: no-cache
Server: Apache/1.3.27 (Unix) PHP/4.2.3
Content-Type: text/html
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Mon, 07 Aug 2006 08:02:36GMT
Client-Date: Thu, 06 Jul 2006 07:37:15 GMT
Client-Peer: 192.168.110.129:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Set-Cookie: PHPSESSID=72e0a426f9363f7ba4b17f19826c5989; path=/
X-Powered-By: PHP/4.2.3
<html>
<style type="text/css">
<!--
body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
8pt}
th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
8pt; font-weight: bold; background-color: #D3DCE3;}
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
8pt;}
form { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
8pt}
textarea{font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt; BACKGROUND-COLOR: white; BORDER-BOTTOM: #000000 1px
solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;}
input.text {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt; BACKGROUND-COLOR: white; BORDER-BOTTOM: #000000 1px
solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;}
input.button {font-family: Verdana; font-size: 8pt}
select { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt; BACKGROUND-COLOR: white; BORDER-BOTTOM: #000000 1px
solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;}
h1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
16pt; font-weight: bold}
A:link { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt; text-decoration: none; color: #0000FF}
A:visited { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt; text-decoration: none; color: #0000FF}
A:hover { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt; text-decoration: underline; color: #FF0000}
A:link.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
color: #0000FF}
A:visited.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
color: #0000FF}
A:hover.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
color: #FF0000}
.nav { font-family: Verdana, Arial, Helvetica, sans-serif; color:
#000000}
-->
</style>
<script LANGUAGE="JavaScript">
function openHelp(helpId){
URL="../../omcHelp/index.php?helpId="+helpId;
var
baseSetting='toolbar=no,directories=no,menubar=no, scrollbars=yes,resizable=yes,left=0,top=0';
var size800=',width=790,height=560';
var size1024=',width=1010,height=710';
if (window.screen.width==800 && window.screen.height==600){
pageSetting = baseSetting + size800;
}else{
pageSetting = baseSetting + size1024;
}
msgWindow = window.open(URL,'helpWin',pageSetting);
msgWindow.focus();
}
</script>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function loadset(){
document.loginForm.userName.value='';
document.loginForm.userPwd.value='';
document.loginForm.userName.focus();
}
function Check(theform){
var username=theform.userName.value;
var password=theform.userPwd.value;
if (username.length < 1){
alert("User ID error!");
theform.userName.focus();
return (false);
}
if (password.length < 6){
alert("password length must >= 6");
theform.userPwd.focus();
theform.userPwd.select();
return (false);
}
return (true);
}
function selectEng(){
window.location.href="/security/login/login.php?selectedLanguage=eng";
}
function selectChn(){
window.location.href="/security/login/login.php?selectedLanguage=chn";
}
//-->
</script>
<body bgcolor="#FFFFFF" onload="loadset()">
<br><br><br><br><br><br>
<form method="POST" name="loginForm"
action="/security/login/login.php?selectedLanguage=eng"
onsubmit="return Check(this)" ><input type="hidden" name="PHPSESSID"
value="72e0a426f9363f7ba4b17f19826c5989" />
<table border="0" width="100%" height="75%" valign="center">
<tr>
<td width="100%" align="center" height="25%" valign="bottom">
<img border="0" src="../../images/alvr_300.gif">
<br><br><br>
</td>
</tr>
<tr>
<td width="100%" align="center" height="10">
<table border="1" width="280" bordercolordark="#FFFFFF"
bordercolor="#808080" cellspacing="0" height="120">
<tr>
<td width="100%" colspan="2" bgcolor="#E6E6E6" height="20"
align="center">
<b><font size="2">
Logon WXC2 Management Console </font></b>
</td>
</tr>
<tr>
<td>
<img border="0" src="../../images/loginUser.gif" > User: </td>
<td align="center">
<input type="text" name="userName" size="20" class="text">
</td>
</tr>
<tr>
<td>
<img border="0" src="../../images/loginPwd.gif" > Password: </td>
<td align="center">
<input type="password" name="userPwd" size="20" class="text">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Login" name="login"
class="button"> <input type="reset" value="Cancel"
class="button"> </td>
</tr>
</table>
</td>
</tr>
<tr><td align="center">
<a style="Cursor:hand" onclick="javascript:selectChn()"><image
src="../../images/chinese.gif"></td></tr>
<tr><td align="center"><b><font
size=6>R8.0(V8.02.10)</font></b></td></tr>
</table>
</form>
</body>
</html>
warhua@gmail.com Guest
-
Strange problem with Forms authentication: After successfull login, login page is still displayed
Hi there I have a quite strange problem with my ASP.NET-Application. The application has being deployed one year ago and worked fine till last... -
user and admin login on same login page
Hello, I have a user login page which also doubles as my administrator login. Currently, my method of logging in doesnt seem to be working... -
Login to admin system through login screen only
Hi there, I have an issue relating to login to my asp.net application. Basically i have built the standard login page which compares against the... -
session problem - login screen continually reloads after pressing the login button
I am trying to get sessions to work on a log in screen to give certain users access to certain pages/directories. The problem is that when the... -
LOGIN: ERROR- Failed to initialize policy manager. (IFOR_PM_FATAL) Login sessions denied.
Verify that you haven't set the system date by mistake to a far away future. All the licenses then become expired! Restoring the system to the... -
Jimi-Carlo Bukowski-Wills #2
Re: how can I login the web
looks ok to me (apart from lack of documtent-type declaration!)
what's your problem?
On Sun, 06 Aug 2006 00:40:55 -0700, [email]warhua@gmail.com[/email]
wrote:
> my code,and i don't know how to get the value of "PHPSEEid"??
> who can tell me how to do ?thank you very much!
> =============
> use HTTP::Request::Common qw(POST);
> use LWP::UserAgent;
>
> my
> $url='http://192.168.110.129/security/login/login.php?selectedLanguage=eng';
> $ua=LWP::UserAgent->new();
> $req1= POST
> $url,[userName=>'manager',userPwd=>'manager',PHPSEEID=>" $PHPSESSID"];
> $content=$ua->request($req1)->as_string;
> print $content;
> =====================
> but i received the message:
> ==================
> HTTP/1.1 200 OK
> Cache-Control: no-cache, must-revalidate
> Connection: close
> Date: Mon, 07 Aug 2006 08:02:36 GMT
> Pragma: no-cache
> Server: Apache/1.3.27 (Unix) PHP/4.2.3
> Content-Type: text/html
> Expires: Mon, 26 Jul 1997 05:00:00 GMT
> Last-Modified: Mon, 07 Aug 2006 08:02:36GMT
> Client-Date: Thu, 06 Jul 2006 07:37:15 GMT
> Client-Peer: 192.168.110.129:80
> Client-Response-Num: 1
> Client-Transfer-Encoding: chunked
> Set-Cookie: PHPSESSID=72e0a426f9363f7ba4b17f19826c5989; path=/
> X-Powered-By: PHP/4.2.3
>
> <html>
> <style type="text/css">
> <!--
> body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
> 8pt}
> th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
> 8pt; font-weight: bold; background-color: #D3DCE3;}
> td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
> 8pt;}
> form { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
> 8pt}
> textarea{font-family: Verdana, Arial, Helvetica, sans-serif;
> font-size: 8pt; BACKGROUND-COLOR: white; BORDER-BOTTOM: #000000 1px
> solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;
> BORDER-TOP: #000000 1px solid;}
> input.text {font-family: Verdana, Arial, Helvetica, sans-serif;
> font-size: 8pt; BACKGROUND-COLOR: white; BORDER-BOTTOM: #000000 1px
> solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;
> BORDER-TOP: #000000 1px solid;}
> input.button {font-family: Verdana; font-size: 8pt}
> select { font-family: Verdana, Arial, Helvetica, sans-serif;
> font-size: 8pt; BACKGROUND-COLOR: white; BORDER-BOTTOM: #000000 1px
> solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;
> BORDER-TOP: #000000 1px solid;}
> h1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
> 16pt; font-weight: bold}
> A:link { font-family: Verdana, Arial, Helvetica, sans-serif;
> font-size: 8pt; text-decoration: none; color: #0000FF}
> A:visited { font-family: Verdana, Arial, Helvetica, sans-serif;
> font-size: 8pt; text-decoration: none; color: #0000FF}
> A:hover { font-family: Verdana, Arial, Helvetica, sans-serif;
> font-size: 8pt; text-decoration: underline; color: #FF0000}
> A:link.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
> color: #0000FF}
> A:visited.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
> color: #0000FF}
> A:hover.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
> color: #FF0000}
> .nav { font-family: Verdana, Arial, Helvetica, sans-serif; color:
> #000000}
> -->
> </style>
> <script LANGUAGE="JavaScript">
> function openHelp(helpId){
> URL="../../omcHelp/index.php?helpId="+helpId;
> var
> baseSetting='toolbar=no,directories=no,menubar=no, scrollbars=yes,resizable=yes,left=0,top=0';
> var size800=',width=790,height=560';
> var size1024=',width=1010,height=710';
>
> if (window.screen.width==800 && window.screen.height==600){
> pageSetting = baseSetting + size800;
> }else{
> pageSetting = baseSetting + size1024;
> }
>
> msgWindow = window.open(URL,'helpWin',pageSetting);
> msgWindow.focus();
> }
> </script>
> <SCRIPT LANGUAGE="JAVASCRIPT">
> <!--
> function loadset(){
> document.loginForm.userName.value='';
> document.loginForm.userPwd.value='';
> document.loginForm.userName.focus();
> }
>
> function Check(theform){
> var username=theform.userName.value;
> var password=theform.userPwd.value;
> if (username.length < 1){
> alert("User ID error!");
> theform.userName.focus();
> return (false);
> }
> if (password.length < 6){
> alert("password length must >= 6");
> theform.userPwd.focus();
> theform.userPwd.select();
> return (false);
> }
> return (true);
> }
>
> function selectEng(){
> window.location.href="/security/login/login.php?selectedLanguage=eng";
> }
>
> function selectChn(){
> window.location.href="/security/login/login.php?selectedLanguage=chn";
> }
>
> //-->
> </script>
>
> <body bgcolor="#FFFFFF" onload="loadset()">
> <br><br><br><br><br><br>
> <form method="POST" name="loginForm"
> action="/security/login/login.php?selectedLanguage=eng"
> onsubmit="return Check(this)" ><input type="hidden" name="PHPSESSID"
> value="72e0a426f9363f7ba4b17f19826c5989" />
> <table border="0" width="100%" height="75%" valign="center">
> <tr>
> <td width="100%" align="center" height="25%" valign="bottom">
> <img border="0" src="../../images/alvr_300.gif">
> <br><br><br>
> </td>
> </tr>
> <tr>
> <td width="100%" align="center" height="10">
> <table border="1" width="280" bordercolordark="#FFFFFF"
> bordercolor="#808080" cellspacing="0" height="120">
> <tr>
> <td width="100%" colspan="2" bgcolor="#E6E6E6" height="20"
> align="center">
> <b><font size="2">
> Logon WXC2 Management Console </font></b>
> </td>
> </tr>
> <tr>
> <td>
> <img border="0" src="../../images/loginUser.gif" > User: </td>
> <td align="center">
> <input type="text" name="userName" size="20" class="text">
> </td>
> </tr>
> <tr>
> <td>
> <img border="0" src="../../images/loginPwd.gif" > Password: </td>
>
> <td align="center">
> <input type="password" name="userPwd" size="20" class="text">
> </td>
> </tr>
> <tr>
> <td colspan="2" align="center">
> <input type="submit" value="Login" name="login"
> class="button"> <input type="reset" value="Cancel"
> class="button"> </td>
> </tr>
> </table>
> </td>
> </tr>
> <tr><td align="center">
> <a style="Cursor:hand" onclick="javascript:selectChn()"><image
> src="../../images/chinese.gif"></td></tr>
> <tr><td align="center"><b><font
> size=6>R8.0(V8.02.10)</font></b></td></tr>
> </table>
> </form>
> </body>
> </html>Jimi-Carlo Bukowski-Wills Guest



Reply With Quote

