How to automatically log in a web page?

B

Brian McCauley

nntp said:
I did basic UserAgent, but it is not working as it is password protected.

When I use browser to visit
http://www.goofiz.com/forum/login.php?redirect=gf_history.php?user_id=1443
It asks for a password. I checked cookie. It uses a session ID by PHP

What do you mean by "I checked cookie. It uses a session ID by PHP"?

Do you mean the session ID is simply a cookie?
I have the password and login username. How do I access it by automatically
submit login/pass? Where should I use the POST?

Assuming its a simply cookie based system - look at the source of the
login form and to start you session post the credentials to the URL that
it would. This, of course, has nothing to do with Perl.

You also need to enable cookies in your LWP::UserAgent. For details
look for the word "cookie" in the LWP::UserAgent documentation.
 
C

ChrisO

nntp said:
I did basic UserAgent, but it is not working as it is password protected.

When I use browser to visit
http://www.goofiz.com/forum/login.php?redirect=gf_history.php?user_id=1443
It asks for a password. I checked cookie. It uses a session ID by PHP

I have the password and login username. How do I access it by automatically
submit login/pass? Where should I use the POST?

It would help to be more specific about what "it is password protected"
means. How were you prompted? There are a number of ways this can
happen depending on the page and the server which is serving the pages.

I am unable to check your URL at this time for further clues.

-ceo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top