Perl Win32::Internet and Session cookies

Discussion in 'Perl Misc' started by omantawy@gmail.com, Sep 19, 2005.

  1. Guest

    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.
    , Sep 19, 2005
    #1
    1. Advertising

  2. Brian Wakem Guest

    wrote:

    > 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.


    --
    Brian Wakem
    Email: http://homepage.ntlworld.com/b.wakem/myemail.png
    Brian Wakem, Sep 19, 2005
    #2
    1. Advertising

  3. John Bokma Guest

    John Bokma, Sep 19, 2005
    #3
  4. Guest

    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?
    , Sep 20, 2005
    #4
  5. Brian Wakem Guest

    wrote:

    > 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.


    --
    Brian Wakem
    Email: http://homepage.ntlworld.com/b.wakem/myemail.png
    Brian Wakem, Sep 20, 2005
    #5
  6. Mothra Guest

    Hello,

    wrote:
    > 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
    Mothra, Sep 20, 2005
    #6
  7. John Bokma Guest

    John Bokma, Sep 20, 2005
    #7
  8. Guest

    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.
    , Sep 21, 2005
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Nitulescu

    Response.Cookies vs Request.Cookies

    Alex Nitulescu, Feb 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    8,479
    Hans Kesting
    Feb 3, 2005
  2. Andy Fish
    Replies:
    3
    Views:
    6,518
    Fredrik Lindner
    Nov 6, 2003
  3. archana
    Replies:
    1
    Views:
    503
  4. _Who
    Replies:
    7
    Views:
    2,653
  5. Michael Edmonson

    Win32::SAPI4 question (Win32 events and Perl)

    Michael Edmonson, Feb 28, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    178
    Michael Edmonson
    Feb 28, 2004
Loading...

Share This Page