Ask a Question related to PERL Beginners, Design and Development.
-
22053447 #1
about the HTTP::Request POST question
Hello, everybody!
Today I write a little perl program to auto-login the website.
I can success to login, but I can't get the data of login after success login.
my code:
I know I success login by $response this variable.Code:use strict; use LWP::UserAgent; my $browser = LWP::UserAgent->new; my $resp = HTTP::Request->new(POST => 'http://www.tvboxnow.com/logging.php?action=login&loginsubmit=yes'); $resp->content_type('application/x-www-form-urlencoded'); $resp->content('loginsubmit=true&username=test&password=test'); my $response=$browser->request($resp)->as_string; my $url="http://www.tvboxnow.com/index.php"; $resp = HTTP::Request->new(GET => $url); print $browser->request($resp)->as_string;
At last, I request new $url to get the 'index.php' data.
But I can't get the 'index.php' of login.
It was logout when I request the new page.
How can I solve this problem?
Junior Member
- Join Date
- Jan 2011
- Posts
- 1
-
HTTP::Request::Common::POST and UTF-8
I'm passing a string containing UTF-8 to HTTP::Request::Common::POST and the UTF-8 seems to be destroyed during the encoding required for... -
Help regarding HTTP::Request:POST
Hi All: I'm facing an issue with the HTTP::Request:POST function. My Code is trying to post some content to other applications and should get an... -
Send Basic HTTP authentication credential in the first HTTP request
Hello, How can I make the web service proxy class send basic authentication information in the HTTP header of the first request? My... -
POST fails in HTTP::Request
Dear Gurus, Thanks everyone for your help so far, I really learnt a lot from your advice. I have stumbled across the following problem recently,... -
RPC Unavailable using HTTP post request
I have a .NET web srvc which internally uses DCOM to connect a remote activex exe. This works fine from clients provided connctions are made via...



Reply With Quote

