I am just wanting to connect to a site via https, download the page, parse through it, and reupload it securely. As it stands, My problem is three-fold: 1) Everyone and their monk have told me they do it all the time, 2) I cannot for the life of me see where I am any different from any other code I have seen on the net, and 3) I get a repsonse from snippet one that I don't understand. I am using (or have used) openSSL 0.9.3-0.9.6 as well as all current version of SSLeay.pm and LWP. Your help in bringing a young acolyte to inner harmony and joy will be greatly rewarded in the afterlife. Both snippets begin with:
use LWP; use LWP::UserAgent; use LWP::Protocol::https;
and then:
my $connect = new LWP::UserAgent; my $request = new HTTP::Request 'POST', 'https://secure.directnic.com/ +myaccount/myaccount.php'; my $response = $connect->request($request); print $response;
This prints HTTP::Response=HASH(nxnnnennn) where n is some number. The second snippet changes
print $response;
to:
print $response->content; print $response->as_string;
and gives me 500 (Internal Server Error) cannot connect to secure.directnic.com:443. I know that I can conect to it when I telnet to that port. Any suggestions from anyone?

In reply to Grab a page using openSSL by CiceroLove

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.