Perl Win32::Internet and Session cookies

O

omantawy

I am trying to create a Perl script that monitors a web site.
This website requires user name and password and when you request the
login form, the server send you a session cookie which is reused
when submitting the form.

I tried to get this cookie using the Win32::Internet but failed.
I have to use Win32::Internet becuase the form is retrieved using HTTPS
not HTTP.

Thanks in advance.
 
B

Brian Wakem

I am trying to create a Perl script that monitors a web site.
This website requires user name and password and when you request the
login form, the server send you a session cookie which is reused
when submitting the form.


Use LWP or WWW::Mechanize

I tried to get this cookie using the Win32::Internet but failed.


Did your computer explode? Saying it failed is pointless without a
description.

I have to use Win32::Internet becuase the form is retrieved using HTTPS
not HTTP.


That is no reason to use Win32::Internet.
 
O

omantawy

Using LWP or WWW::Mechanize requires the Crypto module to be installed
and the openSSL as well to access the HTTPS protocol.

When using the Win32::Internet, the server redirects me back to the
login form since I am sending the request without any session cookies.

Is it possible to maintain the session cookies with Win32::Internet?
 
B

Brian Wakem

Using LWP or WWW::Mechanize requires the Crypto module to be installed
and the openSSL as well to access the HTTPS protocol.

When using the Win32::Internet, the server redirects me back to the
login form since I am sending the request without any session cookies.

Is it possible to maintain the session cookies with Win32::Internet?


I don't really touch windoze these days so I'll take your word for it.
 
M

Mothra

Hello,

Using LWP or WWW::Mechanize requires the Crypto module to be installed
and the openSSL as well to access the HTTPS protocol.

When using the Win32::Internet, the server redirects me back to the
login form since I am sending the request without any session cookies.

The reason you are being redirected back to the login page is not the
cookies
its because you have not established a secure connection.

HTTPS is the protocol for accessing a secure Web server where authentication
and
encrypted communication is possible. Using HTTPS in the URL instead of HTTP
directs the message to a secure port number rather than the default
Web port number of 80. The default TCP/IP port of HTTPS is 443.
Is it possible to maintain the session cookies with Win32::Internet?

Mr. Bokma has already provided you with an excellent way to solve
your problem. I would suggest you take his advice.

Mothra
 
O

omantawy

I think I am going to discard the idea of doing this using the
Win32::Internet.
I used WWW::Mechanize and had to install the Crypt-SSLeay and OpenSSL
and
it worked just fine.

Thank you all for your help.
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top