Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: keep a user signed in

by inman (Curate)
on Nov 14, 2005 at 14:12 UTC ( [id://508315]=note: print w/replies, xml ) Need Help??


in reply to keep a user signed in

Yes - you can use an LWP based application (i suggest using WWW::Mechanize) to login and refresh the page every 10 minutes or so. You need to store the login cookies in your browser cookie store. This is either a text file in the case of Mozilla, Firefox etc. or an individual file in the cookies directory specified by Internet Explorer.

The LWP library has a number of Cookie Jar subclasses to support the main cookie store formats. The trick is to subclass the cookie jar to write out session cookies (that have no expiration time) such that they expire at some point in the future E.g. later today.

This is something that I do on from time to time to test an automated login for website indexing. I wouldn't suggest that you do this on a regular basis. Read the comments from the other monks about potential issues with this approach. You may wish to restate the problem so we can help you find a better solution.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-03-29 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found