Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: how to read local cookies with LWP

by weihe (Initiate)
on Apr 28, 2006 at 18:16 UTC ( [id://546335]=note: print w/replies, xml ) Need Help??


in reply to Re: how to read local cookies with LWP
in thread how to read local cookies with LWP

i use internet explorer 6.0, while i login the website ,it would excute this method,this code in this following,
$namecookie = cookie(-name => "amembernamecookie", -value => "$ +inmembername", -path => "$cookiepath/", -expires => "$CookieDate"); $passcookie = cookie(-name => "apasswordcookie", -value = +> "$inpassword", -path => "$cookiepath/", -expires => "$CookieDate" +); print header(-cookie=>[$namecookie,$passcookie] , -expires=>"$EXP_MODE +" , -cache=>"$CACHE_MODES");
and while i use lwp to load the webpage , it will use this code to read my computer's cookies about username and password, the code is
if (! $inmembername) { $inmembername = cookie("amembernamecookie"); } if (! $inpassword) { $inpassword = cookie("apasswordcookie"); }
as you know LWP is not support cookies by default, and though we use http::cookies to create a cookie file in the harddisk, but it is not equal to the cookies which we login the website and create by server. thanks for you reply me, how can i read the cookies or set cookies with my username and password, while i use a LWP to download the webpage ,the server can know me through the cookies value

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://546335]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found