websites and cookies?

T

Tomasz Chmielewski

I have a webmail which is protected by a "user/password" form (one which
you can find in any webmail, i.e. squirrelmail, yahoo/google mail etc.).

The webmail is the only way to fetch mail; there is no POP3/IMAP there.


Therefore, I'd like to write a Perl script which will "log in" to that
page automatically, parse certain pages (inbox, new mail, save it as
files etc.).

As far as I understand, I need to "emulate" a webbrowser a bit:
1) log in to a website (fill proper form fields, send it to the web server)
2) get the cookie, browse other pages using that cookie


What do I need to implement it in a Perl script?

I'm not looking for a ready solution, I just need some terms to look up
(CGI::Cookie perhaps for handling cookies; but how do I fill a form to
obtain the cookie? links browser?).

Any links to Perl examples would be great too, of course.
 
S

Sherm Pendley

Tomasz Chmielewski said:
As far as I understand, I need to "emulate" a webbrowser a bit:
1) log in to a website (fill proper form fields, send it to the web server)
2) get the cookie, browse other pages using that cookie

What do I need to implement it in a Perl script?

Have a look at WWW::Mechanize

sherm--
 
T

Tad J McClellan

Tomasz Chmielewski said:
I have a webmail which is protected by a "user/password" form (one which
you can find in any webmail, i.e. squirrelmail, yahoo/google mail etc.).

The webmail is the only way to fetch mail; there is no POP3/IMAP there.


Therefore, I'd like to write a Perl script which will "log in" to that
page automatically, parse certain pages (inbox, new mail, save it as
files etc.).

As far as I understand, I need to "emulate" a webbrowser a bit:


You can use the Web Scraping Proxy to write Perl code that
emulates a browser. Google for "Web Scraping Proxy".

1) log in to a website (fill proper form fields, send it to the web server)
2) get the cookie, browse other pages using that cookie


What do I need to implement it in a Perl script?


WWW::Mechanize (or LWP::UserAgent).
 

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

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top