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$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");
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 valueif (! $inmembername) { $inmembername = cookie("amembernamecookie"); } if (! $inpassword) { $inpassword = cookie("apasswordcookie"); }
In reply to Re^2: how to read local cookies with LWP
by weihe
in thread how to read local cookies with LWP
by weihe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |