| | |
LWP for login to an web application
![]() |
•
•
Join Date: Jun 2009
Posts: 1
Reputation:
Solved Threads: 0
Hello friends ,
I have a problem like there is web application and i have to write
a script that should login to the application and then move other parts
of the application
when i try this code i am not able to login to the application
it says 302
that is found , but with no data
i want to do like if i post username/password with all required things then it should return the home page of the application
and keep the connection live to move other parts of the application
Thanks
maxj
I have a problem like there is web application and i have to write
a script that should login to the application and then move other parts
of the application
perl Syntax (Toggle Plain Text)
use HTTP::Request::Common qw(POST); use LWP::UserAgent; use Data::Dumper; $ua = LWP::UserAgent->new(keep_alive=>1); my $req = POST "http://servername.com:5002/index.php", ['user_name' => 'username', 'user_password'=>"password", 'module'=>'Users', 'action'=>'Authenticate', 'return_module'=>'Users', 'return_action'=>'Login', ]; my $res = $ua->request($req); print Dumper(\$res); if ($res->is_success){ print $res->as_string; }
when i try this code i am not able to login to the application
it says 302
that is found , but with no data
i want to do like if i post username/password with all required things then it should return the home page of the application
and keep the connection live to move other parts of the application
Thanks
maxj
Last edited by maxjackie; Jun 22nd, 2009 at 3:42 pm.
![]() |
Similar Threads
- please Help web application(jsp, servlet, tomcat, HTML, OracleDB) (JSP)
- databinding ( connection) Problem in web application (VB.NET)
- PHP Web Application Developer - FLORIDA (Web Development Job Offers)
- Colossal Squid Industries: Web Application Developer (Web Development Job Offers)
- Is there possible to use module class in web application.. (ASP.NET)
- Active Directory based Intranet web application problems (ASP.NET)
- tree structure in web application (HTML and CSS)
- help to set up "Sun Java™ System Application Server PE 8" for web application (Java)
- ColdFusion 5 Web Application Construction Kit (ColdFusion)
Other Threads in the Perl Forum
- Previous Thread: Connecting to remote server
- Next Thread: reading a variable in to my script
| Thread Tools | Search this Thread |





